BoltzExchange / boltz-frontend

Frontend of Boltz (2019-2020)
GNU Affero General Public License v3.0
20 stars 12 forks source link

tried to parse address with `\n` in it #236

Closed antonilol closed 1 year ago

antonilol commented 2 years ago

Describe the bug A clear and concise description of what the bug is.

a swap is 'waiting for transaction' but the transaction is already there

i opened F12 tab and saw this

Uncaught (in promise) Error: tb1qea2kzlul85r94snmxr9ln7ktgesas3qyf0pg0j
 has no matching Script
    at Object.t.toOutputScript (address.js:89:9)
    at C (reverseDuck.js:150:15)
    at reverseDuck.js:212:30
    at u (runtime.js:45:40)
    at Generator._invoke (runtime.js:274:22)
    at Generator.forEach.e.<computed> [as next] (runtime.js:97:21)
    at n (asyncToGenerator.js:3:20)
    at s (asyncToGenerator.js:25:9)

in the localStorage i found address: 'tb1qea2kzlul85r94snmxr9ln7ktgesas3qyf0pg0j\n' (note the \n), apparently i added a return in the input box in js this is easy to fix with String.trim()

To Reproduce Steps to reproduce the behavior: (i think but am not sure) do a reverse submarine swap and enter your address with a return (\n) after it

Expected behavior A clear and concise description of what you expected to happen.

normal flow of a swap

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

armurbalda commented 2 years ago

Thanks for the report! Did you see this on https://boltz.exchange ?

antonilol commented 2 years ago

Sort of yes, it was testnet.boltz.exchange