aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2024-09-17 01:41:50 +0000
committerAdam Soltys <[email protected]>2024-09-17 01:41:50 +0000
commit4d30edc5d3c1c6494514d5f55412d6046299ead2 (patch)
tree7bfa28f803b207be91d20de7379b9880ef2acd04 /lib
parenta448813c7d4fc6fe3a3a97ea213a5acf452d6e0c (diff)
downloadcoinos-server-4d30edc5d3c1c6494514d5f55412d6046299ead2.tar.gz
coinos-server-4d30edc5d3c1c6494514d5f55412d6046299ead2.zip
default account
Diffstat (limited to 'lib')
-rw-r--r--lib/payments.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/payments.ts b/lib/payments.ts
index bcb567c4..075cfab8 100644
--- a/lib/payments.ts
+++ b/lib/payments.ts
@@ -363,6 +363,7 @@ export let decode = async (hex) => {
export let sendOnchain = async (params) => {
let { account, hex, rate, user, signed } = params;
+ if (!account) account = user.id;
if (!hex) ({ hex } = await build(params));
let { tx, type } = await decode(hex);
@@ -625,7 +626,8 @@ export let build = async ({
user,
}) => {
let type = await getAddressType(address);
- let node =
+ if (!account) account = user.id;
+ let node =
account === user.id
? rpc(config[type])
: rpc({ ...config[type], wallet: account });