Psychedelic / plug

Plug is a browser extension for users of the Internet Computer that allows you to access your ICP, Cycles, and other tokens as well as log into IC apps with one click.
GNU General Public License v3.0
166 stars 40 forks source link

[Plug-Extension] [Bug] plug.requestTransfer doesn't throw if user declines the transfer #698

Open ZenVoich opened 1 year ago

ZenVoich commented 1 year ago

Chrome 107.0.5304.110 Plug 0.6.2.1

Code to test:

await window.ic.plug.requestTransfer({
        to: '8b61ff722d7e6321eb99bb607ab0cf323b3c64b43d6a13c245c8a4e197f7b38b',
        amount: Number(111112),
        opts: {
          fee: 10000,
        },
      });

Actual Result promise neither resolved nor rejected

Expected Result: promise rejected


Looks like it was broken in Plug 0.6.2.1. I tested this code in Plug 0.6.1.2 and it throws "The transaction was rejected."