diff --git a/lib/plugins/wallet/galoy/galoy.js b/lib/plugins/wallet/galoy/galoy.js index 1147cc85..a3c1c39c 100644 --- a/lib/plugins/wallet/galoy/galoy.js +++ b/lib/plugins/wallet/galoy/galoy.js @@ -171,7 +171,14 @@ function sendCoins (account, tx, settings, operatorId) { return sendFundsOnChain(wallet.id, toAddress, cryptoAtoms, account.authToken) }) .then(result => { - return result + switch (result.status) { + case 'ALREADY_PAID': + throw new Error('Transaction already exists!') + case 'FAILURE': + throw new Error('Transaction failed!') + default: + return '' + } }) .catch(err => { throw err