Skip to content
This repository was archived by the owner on Apr 21, 2025. It is now read-only.

Commit 10d1b76

Browse files
committed
wip(feat): add oob notes reissuance
1 parent 713abec commit 10d1b76

File tree

10 files changed

+932
-19
lines changed

10 files changed

+932
-19
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@
5555
"@kobalte/core": "^0.9.8",
5656
"@kobalte/tailwindcss": "^0.5.0",
5757
"@modular-forms/solid": "^0.18.1",
58-
"@mutinywallet/mutiny-wasm": "0.5.9",
59-
"@mutinywallet/waila-wasm": "^0.2.6",
58+
"@mutinywallet/mutiny-wasm": "file:../mutiny-node/mutiny-wasm/pkg",
59+
"@mutinywallet/waila-wasm": "file:../bitcoin-waila/waila-wasm/pkg",
6060
"@solid-primitives/upload": "^0.0.111",
6161
"@solidjs/meta": "^0.29.1",
6262
"@solidjs/router": "^0.9.0",

pnpm-lock.yaml

Lines changed: 15 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/AmountEditable.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ export const AmountEditable: ParentComponent<{
4141
activeMethod?: MethodChoice;
4242
methods?: MethodChoice[];
4343
setChosenMethod?: (method: MethodChoice) => void;
44+
isFederation?: boolean;
4445
}> = (props) => {
4546
const [state, _actions] = useMegaStore();
4647
const [mode, setMode] = createSignal<"fiat" | "sats">("sats");

src/i18n/en/translations.ts

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ export default {
1111
fee: "Fee",
1212
send: "Send",
1313
receive: "Receive",
14+
reissue: "Reissue",
1415
dangit: "Dangit",
1516
back: "Back",
1617
coming_soon: "(coming soon)",
@@ -115,6 +116,69 @@ export default {
115116
remember_choice: "Remember my choice next time",
116117
what_for: "What's this for?"
117118
},
119+
reissue: {
120+
reissue_bitcoin: "Receive Bitcoin",
121+
reissue_ecash: "Reissue Ecash",
122+
edit: "Edit",
123+
checking: "Checking",
124+
choose_format: "Choose format",
125+
payment_received: "Payment Received",
126+
payment_initiated: "Payment Initiated",
127+
receive_add_the_sender: "Add the sender for your records",
128+
keep_mutiny_open: "Keep Mutiny open to complete the payment.",
129+
choose_payment_format: "Choose payment format",
130+
unified_label: "Unified",
131+
unified_caption:
132+
"Combines a bitcoin address and a lightning invoice. Sender chooses payment method.",
133+
lightning_label: "Lightning invoice",
134+
lightning_caption:
135+
"Ideal for small transactions. Usually lower fees than on-chain.",
136+
onchain_label: "Bitcoin address",
137+
onchain_caption:
138+
"On-chain, just like Satoshi did it. Ideal for very large transactions.",
139+
unified_setup_fee:
140+
"A lightning setup fee of {{amount}} SATS will be charged if paid over lightning.",
141+
lightning_setup_fee:
142+
"A lightning setup fee of {{amount}} SATS will be charged for this reissue.",
143+
amount: "Amount",
144+
fee: "+ Fee",
145+
total: "Total",
146+
spendable: "Spendable",
147+
channel_size: "Channel size",
148+
channel_reserve: "- Channel reserve",
149+
error_under_min_lightning:
150+
"Defaulting to On-chain. Amount is too small for your initial Lightning reissue.",
151+
error_creating_unified:
152+
"Defaulting to On-chain. Something went wrong when creating the unified address",
153+
error_creating_address:
154+
"Something went wrong when creating the on-chain address",
155+
amount_editable: {
156+
receive_too_small:
157+
"A lightning setup fee might be deducted from the requested amount.",
158+
setup_fee_lightning:
159+
"A lightning setup fee will be charged if paid over lightning.",
160+
too_big_for_beta:
161+
"That's a lot of sats. You do know Mutiny Wallet is still in beta, yeah?",
162+
more_than_21m: "There are only 21 million bitcoin.",
163+
set_amount: "Set amount",
164+
max: "MAX",
165+
fix_amounts: {
166+
ten_k: "10k",
167+
one_hundred_k: "100k",
168+
one_million: "1m"
169+
},
170+
del: "DEL",
171+
balance: "Balance"
172+
},
173+
integrated_qr: {
174+
onchain: "On-chain",
175+
lightning: "Lightning",
176+
unified: "Unified",
177+
gift: "Lightning Gift"
178+
},
179+
remember_choice: "Remember my choice next time",
180+
what_for: "What's this for?"
181+
},
118182
send: {
119183
search: {
120184
placeholder: "Name, address, invoice",

src/logic/waila.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ export type ParsedParams = {
1919
lightning_address?: string;
2020
nostr_wallet_auth?: string;
2121
fedimint_invite?: string;
22+
fedimint_oob_notes?: string;
2223
is_lnurl_auth?: boolean;
2324
contact_id?: string;
2425
};
@@ -40,8 +41,8 @@ export function toParsedParams(
4041
const network = !params.network
4142
? ourNetwork
4243
: params.network === "testnet" && ourNetwork === "signet"
43-
? "signet"
44-
: params.network;
44+
? "signet"
45+
: params.network;
4546

4647
if (network !== ourNetwork) {
4748
return {
@@ -67,7 +68,8 @@ export function toParsedParams(
6768
lightning_address: params.lightning_address,
6869
nostr_wallet_auth: params.nostr_wallet_auth,
6970
is_lnurl_auth: params.is_lnurl_auth,
70-
fedimint_invite: params.fedimint_invite_code
71+
fedimint_invite: params.fedimint_invite_code,
72+
fedimint_oob_notes: params.fedimint_oob_notes
7173
}
7274
};
7375
}

src/router.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import {
1212
Main,
1313
NotFound,
1414
Receive,
15+
Reissue,
1516
Scanner,
1617
Search,
1718
Send,
@@ -100,6 +101,7 @@ export function Router() {
100101
<Route path="/feedback" component={Feedback} />
101102
<Route path="/gift" component={GiftReceive} />
102103
<Route path="/receive" component={Receive} />
104+
<Route path="/reissue" component={Reissue} />
103105
<Route path="/scanner" component={Scanner} />
104106
<Route path="/send" component={Send} />
105107
<Route path="/swap" component={Swap} />

0 commit comments

Comments
 (0)