mirror of
https://github.com/LBRYFoundation/curate.git
synced 2025-08-23 17:37:25 +00:00
Expose funded transaction ID in findOrCreateAccount
This commit is contained in:
parent
98a53aaad0
commit
5d3957f243
1 changed files with 3 additions and 2 deletions
|
@ -210,7 +210,8 @@ Util.LBRY = {
|
||||||
if (create) {
|
if (create) {
|
||||||
const newAccount = await Util.LBRY.createAccount(client, discordID);
|
const newAccount = await Util.LBRY.createAccount(client, discordID);
|
||||||
return {
|
return {
|
||||||
accountID: newAccount.result.id,
|
accountID: newAccount.account.result.id,
|
||||||
|
txID: newAccount.transaction.result.txid,
|
||||||
newAccount: true
|
newAccount: true
|
||||||
};
|
};
|
||||||
} else return { accountID: null };
|
} else return { accountID: null };
|
||||||
|
@ -231,7 +232,7 @@ Util.LBRY = {
|
||||||
const response = await client.lbry.fundAccount({ to: account.result.id, amount: config.startingBalance });
|
const response = await client.lbry.fundAccount({ to: account.result.id, amount: config.startingBalance });
|
||||||
const transaction = await response.json();
|
const transaction = await response.json();
|
||||||
console.info('Funded account', account.result.id, transaction.result.txid);
|
console.info('Funded account', account.result.id, transaction.result.txid);
|
||||||
return account;
|
return { account, transaction };
|
||||||
},
|
},
|
||||||
ensureDecimal(str) {
|
ensureDecimal(str) {
|
||||||
const num = parseFloat(str);
|
const num = parseFloat(str);
|
||||||
|
|
Loading…
Add table
Reference in a new issue