debug withdraw

This commit is contained in:
Snazzah 2020-08-12 02:29:56 -05:00
parent 93a5c5a7b1
commit 9465f82a71
No known key found for this signature in database
GPG key ID: 5E71D54F3D86282E

View file

@ -26,9 +26,10 @@ module.exports = class Withdraw extends Command {
// Send to wallet // Send to wallet
const response = await this.client.lbry.sendToWallet({ amount, to: args[1] }); const response = await this.client.lbry.sendToWallet({ amount, to: args[1] });
if (await this.handleResponse(message, response)) return; if (await this.handleResponse(message, response)) return;
const txid = (await response.json()).result.inputs[0].txid; const transaction = await response.json();
console.debug('withdrew from master wallet', transaction);
return message.channel.createMessage(`Sent ${parseFloat(amount)} LBC to ${args[1]}.\n` + return message.channel.createMessage(`Sent ${parseFloat(amount)} LBC to ${args[1]}.\n` +
`https://explorer.lbry.com/tx/${txid}`); `https://explorer.lbry.com/tx/${transaction.result.inputs[0].txid}`);
} }
get metadata() { return { get metadata() { return {