Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wip(feat): add oob notes reissuance #891

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"@kobalte/core": "^0.9.8",
"@kobalte/tailwindcss": "^0.5.0",
"@modular-forms/solid": "^0.18.1",
"@mutinywallet/mutiny-wasm": "0.6.0-rc2",
"@mutinywallet/mutiny-wasm": "file:../mutiny-node/mutiny-wasm/pkg",
"@solid-primitives/upload": "^0.0.111",
"@solidjs/meta": "^0.29.1",
"@solidjs/router": "^0.9.0",
Expand Down
14 changes: 8 additions & 6 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/components/AmountEditable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ export const AmountEditable: ParentComponent<{
activeMethod?: MethodChoice;
methods?: MethodChoice[];
setChosenMethod?: (method: MethodChoice) => void;
isFederation?: boolean;
}> = (props) => {
const [state, _actions] = useMegaStore();
const [mode, setMode] = createSignal<"fiat" | "sats">("sats");
Expand Down
64 changes: 64 additions & 0 deletions src/i18n/en/translations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export default {
fee: "Fee",
send: "Send",
receive: "Receive",
reissue: "Reissue",
dangit: "Dangit",
back: "Back",
coming_soon: "(coming soon)",
Expand Down Expand Up @@ -113,6 +114,69 @@ export default {
remember_choice: "Remember my choice next time",
what_for: "What's this for?"
},
reissue: {
reissue_bitcoin: "Receive Bitcoin",
reissue_ecash: "Reissue Ecash",
edit: "Edit",
checking: "Checking",
choose_format: "Choose format",
payment_received: "Payment Received",
payment_initiated: "Payment Initiated",
receive_add_the_sender: "Add the sender for your records",
keep_mutiny_open: "Keep Mutiny open to complete the payment.",
choose_payment_format: "Choose payment format",
unified_label: "Unified",
unified_caption:
"Combines a bitcoin address and a lightning invoice. Sender chooses payment method.",
lightning_label: "Lightning invoice",
lightning_caption:
"Ideal for small transactions. Usually lower fees than on-chain.",
onchain_label: "Bitcoin address",
onchain_caption:
"On-chain, just like Satoshi did it. Ideal for very large transactions.",
unified_setup_fee:
"A lightning setup fee of {{amount}} SATS will be charged if paid over lightning.",
lightning_setup_fee:
"A lightning setup fee of {{amount}} SATS will be charged for this reissue.",
amount: "Amount",
fee: "+ Fee",
total: "Total",
spendable: "Spendable",
channel_size: "Channel size",
channel_reserve: "- Channel reserve",
error_under_min_lightning:
"Defaulting to On-chain. Amount is too small for your initial Lightning reissue.",
error_creating_unified:
"Defaulting to On-chain. Something went wrong when creating the unified address",
error_creating_address:
"Something went wrong when creating the on-chain address",
amount_editable: {
receive_too_small:
"A lightning setup fee might be deducted from the requested amount.",
setup_fee_lightning:
"A lightning setup fee will be charged if paid over lightning.",
too_big_for_beta:
"That's a lot of sats. You do know Mutiny Wallet is still in beta, yeah?",
more_than_21m: "There are only 21 million bitcoin.",
set_amount: "Set amount",
max: "MAX",
fix_amounts: {
ten_k: "10k",
one_hundred_k: "100k",
one_million: "1m"
},
del: "DEL",
balance: "Balance"
},
integrated_qr: {
onchain: "On-chain",
lightning: "Lightning",
unified: "Unified",
gift: "Lightning Gift"
},
remember_choice: "Remember my choice next time",
what_for: "What's this for?"
},
send: {
search: {
placeholder: "Name, address, invoice",
Expand Down
8 changes: 5 additions & 3 deletions src/logic/waila.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export type ParsedParams = {
lightning_address?: string;
nostr_wallet_auth?: string;
fedimint_invite?: string;
fedimint_oob_notes?: string;
is_lnurl_auth?: boolean;
contact_id?: string;
};
Expand All @@ -37,8 +38,8 @@ export function toParsedParams(
const network = !params.network
? ourNetwork
: params.network === "testnet" && ourNetwork === "signet"
? "signet"
: params.network;
? "signet"
: params.network;

if (network !== ourNetwork) {
return {
Expand All @@ -64,7 +65,8 @@ export function toParsedParams(
lightning_address: params.lightning_address,
nostr_wallet_auth: params.nostr_wallet_auth,
is_lnurl_auth: params.is_lnurl_auth,
fedimint_invite: params.fedimint_invite_code
fedimint_invite: params.fedimint_invite_code,
fedimint_oob_notes: params.fedimint_oob_notes
}
};
}
2 changes: 2 additions & 0 deletions src/router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
Main,
NotFound,
Receive,
Reissue,
Scanner,
Search,
Send,
Expand Down Expand Up @@ -100,6 +101,7 @@ export function Router() {
<Route path="/feedback" component={Feedback} />
<Route path="/gift" component={GiftReceive} />
<Route path="/receive" component={Receive} />
<Route path="/reissue" component={Reissue} />
<Route path="/scanner" component={Scanner} />
<Route path="/send" component={Send} />
<Route path="/swap" component={Swap} />
Expand Down
Loading
Loading