File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -495,16 +495,19 @@ export default defineComponent({
495
495
// For now only plain USDC/Polygon/ETH addresses are supported.
496
496
// TODO support Polygon-USDC request links and even consider removing scanning of plain addresses
497
497
// due to the risk of USDC being sent on the wrong chain.
498
- uri = uri .replace (` ${window .location .origin }/ ` , ' ' )
499
- .replace (' polygon:' , ' ' );
498
+ const url = new URL (uri );
500
499
const { ethers } = await getPolygonClient ();
501
- if (ethers .utils .isAddress (uri )) {
500
+ if (ethers .utils .isAddress (url . pathname )) {
502
501
if (event ) {
503
502
// Prevent paste event being applied to the recipient label field, that now became focussed.
504
503
event .preventDefault ();
505
504
}
506
505
507
- onAddressEntered (uri );
506
+ await onAddressEntered (url .pathname );
507
+
508
+ if (url .searchParams .has (' amount' )) {
509
+ amount .value = parseFloat (url .searchParams .get (' amount' )! ) * 1e6 ;
510
+ }
508
511
}
509
512
}
510
513
You can’t perform that action at this time.
0 commit comments