diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 4e2ae483e..05a492e62 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -3514,12 +3514,20 @@ packages:
solid-js: 1.8.5
dev: false
- /@solidjs/meta@0.28.6(solid-js@1.7.9):
+ /@solidjs/meta@0.28.6(solid-js@1.8.3):
resolution: {integrity: sha512-mplUfmp7tjGgDTiVbEAqkWDLpr0ZNyR1+OOETNyJt759MqPzh979X3oJUk8SZisGII0BNycmHDIGc0Shqx7bIg==}
peerDependencies:
solid-js: '>=1.4.0'
dependencies:
- solid-js: 1.7.9
+ solid-js: 1.8.3
+
+ /@solidjs/meta@0.29.1(solid-js@1.8.5):
+ resolution: {integrity: sha512-qtrBYCnRRuzyvBg/u/SRO/2fM5r6DT1YKf+2W1RZhveMoeXHbZpWIrXjgpLFRHJLn6cqAGqrIzu42qS2o+1hKQ==}
+ peerDependencies:
+ solid-js: '>=1.8.4'
+ dependencies:
+ solid-js: 1.8.5
+ dev: false
/@solidjs/meta@0.29.1(solid-js@1.8.5):
resolution: {integrity: sha512-qtrBYCnRRuzyvBg/u/SRO/2fM5r6DT1YKf+2W1RZhveMoeXHbZpWIrXjgpLFRHJLn6cqAGqrIzu42qS2o+1hKQ==}
@@ -5443,8 +5451,8 @@ packages:
typescript:
optional: true
dependencies:
- '@typescript-eslint/types': 6.7.0
- '@typescript-eslint/visitor-keys': 6.7.0
+ '@typescript-eslint/types': 6.9.1
+ '@typescript-eslint/visitor-keys': 6.9.1
debug: 4.3.4
globby: 11.1.0
is-glob: 4.0.3
@@ -6330,7 +6338,7 @@ packages:
/call-bind@1.0.2:
resolution: {integrity: sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==}
dependencies:
- function-bind: 1.1.1
+ function-bind: 1.1.2
get-intrinsic: 1.2.1
dev: true
@@ -7333,7 +7341,7 @@ packages:
engines: {node: '>= 0.4'}
dependencies:
get-intrinsic: 1.2.1
- has: 1.0.3
+ has: 1.0.4
has-tostringtag: 1.0.0
dev: true
@@ -7648,17 +7656,17 @@ packages:
resolution: {integrity: sha512-jyfL/pwPqaFXyKnj8lP8iLk6Z0m099uXR45aSN8Av1XD4vhvQutxxPzgA2bTcAwQpa1zCXDcWOlhFgyP3GKqhQ==}
dev: true
- /esbuild-plugin-solid@0.5.0(esbuild@0.17.19)(solid-js@1.7.9):
+ /esbuild-plugin-solid@0.5.0(esbuild@0.17.19)(solid-js@1.8.5):
resolution: {integrity: sha512-ITK6n+0ayGFeDVUZWNMxX+vLsasEN1ILrg4pISsNOQ+mq4ljlJJiuXotInd+HE0MzwTcA9wExT1yzDE2hsqPsg==}
peerDependencies:
esbuild: '>=0.12'
solid-js: '>= 1.0'
dependencies:
- '@babel/core': 7.22.10
- '@babel/preset-typescript': 7.22.5(@babel/core@7.22.10)
- babel-preset-solid: 1.7.7(@babel/core@7.22.10)
+ '@babel/core': 7.23.2
+ '@babel/preset-typescript': 7.23.2(@babel/core@7.23.2)
+ babel-preset-solid: 1.8.4(@babel/core@7.23.2)
esbuild: 0.17.19
- solid-js: 1.7.9
+ solid-js: 1.8.5
transitivePeerDependencies:
- supports-color
@@ -7928,22 +7936,8 @@ packages:
resolution: {integrity: sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==}
engines: {node: '>=4'}
peerDependencies:
- '@typescript-eslint/parser': '*'
eslint: '*'
- eslint-import-resolver-node: '*'
- eslint-import-resolver-typescript: '*'
- eslint-import-resolver-webpack: '*'
- peerDependenciesMeta:
- '@typescript-eslint/parser':
- optional: true
- eslint:
- optional: true
- eslint-import-resolver-node:
- optional: true
- eslint-import-resolver-typescript:
- optional: true
- eslint-import-resolver-webpack:
- optional: true
+ eslint-plugin-import: '*'
dependencies:
'@typescript-eslint/parser': 6.2.0(eslint@8.46.0)(typescript@5.1.6)
debug: 3.2.7(supports-color@5.5.0)
@@ -9159,7 +9153,7 @@ packages:
engines: {node: '>= 0.4'}
dependencies:
get-intrinsic: 1.2.1
- has: 1.0.3
+ has: 1.0.4
side-channel: 1.0.4
dev: true
@@ -10856,13 +10850,13 @@ packages:
'@polka/url': 1.0.0-next.21
trouter: 3.2.1
- /postcss-import@15.1.0(postcss@8.4.27):
+ /postcss-import@15.1.0(postcss@8.4.31):
resolution: {integrity: sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew==}
engines: {node: '>=14.0.0'}
peerDependencies:
postcss: ^8.0.0
dependencies:
- postcss: 8.4.27
+ postcss: 8.4.31
postcss-value-parser: 4.2.0
read-cache: 1.0.0
resolve: 1.22.4
@@ -10879,7 +10873,7 @@ packages:
read-cache: 1.0.0
resolve: 1.22.4
- /postcss-js@4.0.1(postcss@8.4.27):
+ /postcss-js@4.0.1(postcss@8.4.31):
resolution: {integrity: sha512-dDLF8pEO191hJMtlHFPRa8xsizHaM82MLfNkUHdUtVEV3tgTp5oj+8qbEqYM57SLfc74KSbw//4SeJma2LRVIw==}
engines: {node: ^12 || ^14 || >= 16}
peerDependencies:
@@ -10898,7 +10892,7 @@ packages:
camelcase-css: 2.0.1
postcss: 8.4.31
- /postcss-load-config@4.0.1(postcss@8.4.27):
+ /postcss-load-config@4.0.1(postcss@8.4.31):
resolution: {integrity: sha512-vEJIc8RdiBRu3oRAI0ymerOn+7rPuMvRXslTvZUKZonDHFIczxztIyJ1urxM1x9JXEikvpWWTUUqal5j/8QgvA==}
engines: {node: '>= 14'}
peerDependencies:
@@ -10986,13 +10980,13 @@ packages:
postcss: 8.4.27
dev: true
- /postcss-nested@6.0.1(postcss@8.4.27):
+ /postcss-nested@6.0.1(postcss@8.4.31):
resolution: {integrity: sha512-mEp4xPMi5bSWiMbsgoPfcP74lsWLHkQbZc3sY+jWYd65CUwXrUaTp0fmNpa01ZcETKlIgUdFN/MpS2xZtqL9dQ==}
engines: {node: '>=12.0'}
peerDependencies:
postcss: ^8.2.14
dependencies:
- postcss: 8.4.27
+ postcss: 8.4.31
postcss-selector-parser: 6.0.13
dev: true
@@ -12119,24 +12113,22 @@ packages:
solid-js: 1.8.5
dev: true
- /solid-start-node@0.3.0(solid-start@0.2.29)(undici@5.22.1)(vite@4.4.7):
- resolution: {integrity: sha512-kg0J6aTvnxGj3OnK4L6EQWY6O3y4dn0CB8Q+6e++Pbzw+VMs8uZg/H9/jg+Ul3fw9uitsnwgxQmieKviaSIxMQ==}
+ /solid-start-node@0.3.9(solid-start@0.3.9)(vite@4.5.0):
+ resolution: {integrity: sha512-BWE4g2CqTzq3L2e4TX7kfFC++YiOUqbNFuReLW0gji091qb2sVKqaCBLInfsoLDNAdNdU2Fj659ZZn33b2JqUQ==}
peerDependencies:
solid-start: '*'
- undici: ^5.8.0
vite: '*'
dependencies:
- '@rollup/plugin-commonjs': 24.1.0(rollup@3.28.0)
- '@rollup/plugin-json': 6.0.0(rollup@3.28.0)
- '@rollup/plugin-node-resolve': 15.2.0(rollup@3.28.0)
+ '@rollup/plugin-commonjs': 24.1.0(rollup@3.29.4)
+ '@rollup/plugin-json': 6.0.1(rollup@3.29.4)
+ '@rollup/plugin-node-resolve': 15.2.3(rollup@3.29.4)
compression: 1.7.4
polka: 1.0.0-next.22
- rollup: 3.28.0
+ rollup: 3.29.4
sirv: 2.0.3
- solid-start: 0.2.29(@solidjs/meta@0.28.6)(@solidjs/router@0.8.3)(solid-js@1.7.9)(solid-start-node@0.3.0)(vite@4.4.7)
+ solid-start: 0.3.9(@solidjs/meta@0.29.1)(@solidjs/router@0.8.3)(solid-js@1.8.5)(solid-start-node@0.3.9)(vite@4.5.0)
terser: 5.19.2
- undici: 5.22.1
- vite: 4.4.7(@types/node@18.17.1)(less@4.2.0)
+ vite: 4.5.0(@types/node@20.8.10)
transitivePeerDependencies:
- supports-color
@@ -12144,9 +12136,9 @@ packages:
resolution: {integrity: sha512-Lvov1rQSJGPsBAPh/ot4UGuxrMeb2PjRV/QXT3eoTPjbTjtLGfo9OJWtZHXHuCIrFgqiNQvX/K95jZgfR6jJ+w==}
hasBin: true
peerDependencies:
- '@solidjs/meta': ^0.28.0
+ '@solidjs/meta': ^0.29.1
'@solidjs/router': ^0.8.2
- solid-js: ^1.6.2
+ solid-js: ^1.8.4
solid-start-aws: '*'
solid-start-cloudflare-pages: '*'
solid-start-cloudflare-workers: '*'
@@ -12174,42 +12166,43 @@ packages:
solid-start-vercel:
optional: true
dependencies:
- '@babel/core': 7.22.10
- '@babel/generator': 7.22.10
- '@babel/plugin-syntax-jsx': 7.22.5(@babel/core@7.22.10)
- '@babel/preset-env': 7.22.10(@babel/core@7.22.10)
- '@babel/preset-typescript': 7.22.5(@babel/core@7.22.10)
- '@babel/template': 7.22.5
- '@solidjs/meta': 0.28.6(solid-js@1.7.9)
- '@solidjs/router': 0.8.3(solid-js@1.7.9)
- '@types/cookie': 0.5.1
- '@types/debug': 4.1.8
+ '@babel/core': 7.23.2
+ '@babel/generator': 7.23.0
+ '@babel/plugin-syntax-jsx': 7.22.5(@babel/core@7.23.2)
+ '@babel/preset-env': 7.23.2(@babel/core@7.23.2)
+ '@babel/preset-typescript': 7.23.2(@babel/core@7.23.2)
+ '@babel/template': 7.22.15
+ '@solidjs/meta': 0.29.1(solid-js@1.8.5)
+ '@solidjs/router': 0.8.3(solid-js@1.8.5)
+ '@types/cookie': 0.5.3
+ '@types/debug': 4.1.10
chokidar: 3.5.3
compression: 1.7.4
connect: 3.7.0
debug: 4.3.4
dequal: 2.0.3
dotenv: 16.3.1
- es-module-lexer: 1.3.0
+ es-module-lexer: 1.3.1
esbuild: 0.17.19
- esbuild-plugin-solid: 0.5.0(esbuild@0.17.19)(solid-js@1.7.9)
+ esbuild-plugin-solid: 0.5.0(esbuild@0.17.19)(solid-js@1.8.5)
fast-glob: 3.3.1
get-port: 6.1.2
+ micromorph: 0.3.1
parse-multipart-data: 1.5.0
picocolors: 1.0.0
- rollup: 3.28.0
- rollup-plugin-visualizer: 5.9.2(rollup@3.28.0)
- rollup-route-manifest: 1.0.0(rollup@3.28.0)
+ rollup: 3.29.4
+ rollup-plugin-visualizer: 5.9.2(rollup@3.29.4)
+ rollup-route-manifest: 1.0.0(rollup@3.29.4)
sade: 1.8.1
set-cookie-parser: 2.6.0
sirv: 2.0.3
- solid-js: 1.7.9
- solid-start-node: 0.3.0(solid-start@0.2.29)(undici@5.22.1)(vite@4.4.7)
+ solid-js: 1.8.5
+ solid-start-node: 0.3.9(solid-start@0.3.9)(vite@4.5.0)
terser: 5.19.2
- undici: 5.22.1
- vite: 4.4.7(@types/node@18.17.1)(less@4.2.0)
- vite-plugin-inspect: 0.7.38(rollup@3.28.0)(vite@4.4.7)
- vite-plugin-solid: 2.7.0(solid-js@1.7.9)(vite@4.4.7)
+ undici: 5.27.1
+ vite: 4.5.0(@types/node@20.8.10)
+ vite-plugin-inspect: 0.7.38(rollup@3.28.0)(vite@4.5.0)
+ vite-plugin-solid: 2.7.0(solid-js@1.8.5)(vite@4.5.0)
wait-on: 6.0.1(debug@4.3.4)
transitivePeerDependencies:
- '@nuxt/kit'
@@ -12546,6 +12539,37 @@ packages:
resolution: {integrity: sha512-A0KgSkef7eE4Mf+nKJ83i75TMyq8HqY3qmFIJSWy8bNt0v1lG7jUcpGpoTFxAwYcWOphcTBLPPJg+bDfhDf52w==}
engines: {node: '>=14.0.0'}
hasBin: true
+ dependencies:
+ '@alloc/quick-lru': 5.2.0
+ arg: 5.0.2
+ chokidar: 3.5.3
+ didyoumean: 1.2.2
+ dlv: 1.1.3
+ fast-glob: 3.3.1
+ glob-parent: 6.0.2
+ is-glob: 4.0.3
+ jiti: 1.20.0
+ lilconfig: 2.1.0
+ micromatch: 4.0.5
+ normalize-path: 3.0.0
+ object-hash: 3.0.0
+ picocolors: 1.0.0
+ postcss: 8.4.31
+ postcss-import: 15.1.0(postcss@8.4.31)
+ postcss-js: 4.0.1(postcss@8.4.31)
+ postcss-load-config: 4.0.1(postcss@8.4.31)
+ postcss-nested: 6.0.1(postcss@8.4.31)
+ postcss-selector-parser: 6.0.13
+ resolve: 1.22.8
+ sucrase: 3.34.0
+ transitivePeerDependencies:
+ - ts-node
+ dev: true
+
+ /tailwindcss@3.3.5:
+ resolution: {integrity: sha512-5SEZU4J7pxZgSkv7FP1zY8i2TIAOooNZ1e/OGtxIEv6GltpoiXUqWvLy89+a10qYTB1N5Ifkuw9lqQkN9sscvA==}
+ engines: {node: '>=14.0.0'}
+ hasBin: true
dependencies:
'@alloc/quick-lru': 5.2.0
arg: 5.0.2
@@ -12561,11 +12585,11 @@ packages:
normalize-path: 3.0.0
object-hash: 3.0.0
picocolors: 1.0.0
- postcss: 8.4.27
- postcss-import: 15.1.0(postcss@8.4.27)
- postcss-js: 4.0.1(postcss@8.4.27)
- postcss-load-config: 4.0.1(postcss@8.4.27)
- postcss-nested: 6.0.1(postcss@8.4.27)
+ postcss: 8.4.31
+ postcss-import: 15.1.0(postcss@8.4.31)
+ postcss-js: 4.0.1(postcss@8.4.31)
+ postcss-load-config: 4.0.1(postcss@8.4.31)
+ postcss-nested: 6.0.1(postcss@8.4.31)
postcss-selector-parser: 6.0.13
resolve: 1.22.4
sucrase: 3.34.0
@@ -13908,8 +13932,8 @@ packages:
resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==}
dev: true
- /yaml@2.3.1:
- resolution: {integrity: sha512-2eHWfjaoXgTBC2jNM1LRef62VQa0umtvRiDSk6HSzW7RvS5YtkabJrwYLLEKWBc8a5U2PTSCs+dJjUTJdlHsWQ==}
+ /yaml@2.3.3:
+ resolution: {integrity: sha512-zw0VAJxgeZ6+++/su5AFoqBbZbrEakwu+X0M5HmcwUiBL7AzcuPKjj5we4xfQLp78LkEMpD0cOnUhmgOVy3KdQ==}
engines: {node: '>= 14'}
/yargs-parser@18.1.3:
diff --git a/src/logic/waila.ts b/src/logic/waila.ts
index eb27e93d3..66bc169d6 100644
--- a/src/logic/waila.ts
+++ b/src/logic/waila.ts
@@ -6,7 +6,9 @@ import { Result } from "~/utils";
await initWaila();
export type ParsedParams = {
+ original: string;
address?: string;
+ payjoin_enabled?: boolean;
invoice?: string;
amount_sats?: bigint;
network?: string;
@@ -49,7 +51,9 @@ export function toParsedParams(
return {
ok: true,
value: {
+ original: str,
address: params.address,
+ payjoin_enabled: params.payjoin_supported,
invoice: params.invoice,
amount_sats: params.amount_sats,
network,
diff --git a/src/routes/Send.tsx b/src/routes/Send.tsx
index ae03baa56..f259109d2 100644
--- a/src/routes/Send.tsx
+++ b/src/routes/Send.tsx
@@ -213,31 +213,7 @@ function DestinationShower(props: {
);
}
-function Failure(props: { reason: string }) {
- const i18n = useI18n();
-
- return (
-
-
-
-
- {i18n.t("send.payment_pending")}
-
-
- {i18n.t("send.payment_pending_description")}
-
-
-
-
-
- {props.reason}
-
-
-
- );
-}
-
-export function Send() {
+export default function Send() {
const [state, actions] = useMegaStore();
const navigate = useNavigate();
const i18n = useI18n();
@@ -257,6 +233,7 @@ export function Send() {
const [lnurlp, setLnurlp] = createSignal();
const [lnAddress, setLnAddress] = createSignal();
const [address, setAddress] = createSignal();
+ const [payjoinEnabled, setPayjoinEnabled] = createSignal();
const [description, setDescription] = createSignal();
const [isHodlInvoice, setIsHodlInvoice] = createSignal(false);
@@ -286,6 +263,7 @@ export function Send() {
setSource("lightning");
setInvoice(undefined);
setAddress(undefined);
+ setPayjoinEnabled(undefined);
setDescription(undefined);
setNodePubkey(undefined);
setLnurlp(undefined);
@@ -406,6 +384,8 @@ export function Send() {
if (!source) return;
try {
if (source.address) setAddress(source.address);
+ if (source.payjoin_enabled)
+ setPayjoinEnabled(source.payjoin_enabled);
if (source.memo) setDescription(source.memo);
if (source.invoice) {
@@ -624,6 +604,16 @@ export function Send() {
tags
);
+ sentDetails.amount = amountSats();
+ sentDetails.destination = address();
+ sentDetails.txid = txid;
+ sentDetails.fee_estimate = feeEstimate() ?? 0;
+ } else if (payjoinEnabled()) {
+ const txid = await state.mutiny_wallet?.send_payjoin(
+ destination()!.original,
+ amountSats(),
+ tags
+ );
sentDetails.amount = amountSats();
sentDetails.destination = address();
sentDetails.txid = txid;
diff --git a/src/state/megaStore.tsx b/src/state/megaStore.tsx
index 3a2ce105d..acc902a2f 100644
--- a/src/state/megaStore.tsx
+++ b/src/state/megaStore.tsx
@@ -359,6 +359,7 @@ export const Provider: ParentComponent = (props) => {
} else {
if (
result.value?.address ||
+ result.value?.payjoin_enabled ||
result.value?.invoice ||
result.value?.node_pubkey ||
result.value?.lnurl