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

Commit 39c0b83

Browse files
committed
wip(feat): add oob notes reissuance
1 parent 6ee0e7b commit 39c0b83

File tree

10 files changed

+934
-8
lines changed

10 files changed

+934
-8
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
"@kobalte/core": "^0.9.8",
5959
"@kobalte/tailwindcss": "^0.5.0",
6060
"@modular-forms/solid": "^0.18.1",
61-
"@mutinywallet/mutiny-wasm": "0.6.0-rc2",
61+
"@mutinywallet/mutiny-wasm": "file:../mutiny-node/mutiny-wasm/pkg",
6262
"@solid-primitives/upload": "^0.0.111",
6363
"@solidjs/meta": "^0.29.1",
6464
"@solidjs/router": "^0.9.0",

pnpm-lock.yaml

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

src/logic/waila.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export type ParsedParams = {
1616
lightning_address?: string;
1717
nostr_wallet_auth?: string;
1818
fedimint_invite?: string;
19+
fedimint_oob_notes?: string;
1920
is_lnurl_auth?: boolean;
2021
contact_id?: string;
2122
};
@@ -37,8 +38,8 @@ export function toParsedParams(
3738
const network = !params.network
3839
? ourNetwork
3940
: params.network === "testnet" && ourNetwork === "signet"
40-
? "signet"
41-
: params.network;
41+
? "signet"
42+
: params.network;
4243

4344
if (network !== ourNetwork) {
4445
return {
@@ -64,7 +65,8 @@ export function toParsedParams(
6465
lightning_address: params.lightning_address,
6566
nostr_wallet_auth: params.nostr_wallet_auth,
6667
is_lnurl_auth: params.is_lnurl_auth,
67-
fedimint_invite: params.fedimint_invite_code
68+
fedimint_invite: params.fedimint_invite_code,
69+
fedimint_oob_notes: params.fedimint_oob_notes
6870
}
6971
};
7072
}

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)