From 9de743fae7a3356fc99c44b54ebd03a3b1789ba1 Mon Sep 17 00:00:00 2001 From: finned-palmer Date: Wed, 14 Jul 2021 14:53:46 -0500 Subject: [PATCH] Use deSig for isPatp --- pkg/btc-wallet/src/js/components/lib/send.js | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/pkg/btc-wallet/src/js/components/lib/send.js b/pkg/btc-wallet/src/js/components/lib/send.js index b5239333a..d49c38e92 100644 --- a/pkg/btc-wallet/src/js/components/lib/send.js +++ b/pkg/btc-wallet/src/js/components/lib/send.js @@ -81,10 +81,10 @@ const Send = ({ stopSending, value, conversion }) => { }; let payeeReceived = e.target.value; - let isPatp = ob.isValidPatp(payeeReceived); + let isPatp = ob.isValidPatp(`~${deSig(payeeReceived)}`); let isAddress = validate(payeeReceived); if (isPatp) { - validPatPCommand(payeeReceived); + validPatPCommand(`~${deSig(payeeReceived)}`); } else if (isAddress) { setPayee(payeeReceived); setReady(true); @@ -92,16 +92,11 @@ const Send = ({ stopSending, value, conversion }) => { setPayeeType('address'); setValidPayee(true); } else { - const possibleValidPatPMissingSig = `~${deSig(payeeReceived)}`; - if (ob.isValidPatp(possibleValidPatPMissingSig)) { - validPatPCommand(possibleValidPatPMissingSig); - } else { - setPayee(payeeReceived); - setReady(false); - setCheckingPatp(false); - setPayeeType(''); - setValidPayee(false); - } + setPayee(payeeReceived); + setReady(false); + setCheckingPatp(false); + setPayeeType(''); + setValidPayee(false); } };