From 2463fd95880eed1ea94b0c9bad5e2caec36500fe Mon Sep 17 00:00:00 2001 From: wltsmrz Date: Wed, 11 Sep 2013 13:00:32 -0700 Subject: [PATCH] Fix human amount detection in .payment --- src/js/ripple/transaction.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/ripple/transaction.js b/src/js/ripple/transaction.js index 43936708..3cfab1d0 100644 --- a/src/js/ripple/transaction.js +++ b/src/js/ripple/transaction.js @@ -517,7 +517,7 @@ Transaction.prototype.payment = function (src, dst, amount) { throw new Error('Payment destination address invalid'); } - if (typeof amount === 'string' && !Number(amount)) { + if (/^[\d]+[A-Z]{3}$/.test(amount)) { amount = Amount.from_human(amount); }