@depay/widgets 10.1.0 → 10.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/index.bundle.js +22 -22
- package/dist/esm/index.js +326 -97
- package/dist/umd/index.bundle.js +22 -22
- package/dist/umd/index.js +326 -97
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -2417,6 +2417,246 @@ var allWallets = [{
|
|
|
2417
2417
|
}
|
|
2418
2418
|
},
|
|
2419
2419
|
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/f78dab27-7165-4a3d-fdb1-fcff06c0a700?projectId=ec576959c7769a8b4dbbb3da3f12fef4"
|
|
2420
|
+
}, {
|
|
2421
|
+
"name": "Binana",
|
|
2422
|
+
"link": "WalletConnectV1",
|
|
2423
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/65a60845-8fe3-4146-2688-586e4dc68a00?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2424
|
+
}, {
|
|
2425
|
+
"name": "Linen",
|
|
2426
|
+
"link": "WalletConnectV1",
|
|
2427
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/91458f54-aabe-44cf-4788-159ccc733600?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2428
|
+
}, {
|
|
2429
|
+
"name": "Fundamenta Mobile",
|
|
2430
|
+
"link": "WalletConnectV1",
|
|
2431
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/79797f9e-a6c7-4284-1a1c-88332f11ea00?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2432
|
+
}, {
|
|
2433
|
+
"name": "Nitrogen Wallet",
|
|
2434
|
+
"link": "WalletConnectV1",
|
|
2435
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/af185895-cda5-4eaf-e31b-28b6fe4b0800?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2436
|
+
}, {
|
|
2437
|
+
"name": "ApolloX",
|
|
2438
|
+
"link": "WalletConnectV1",
|
|
2439
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/80ab63a2-1b32-4140-3577-9fbc8ea82e00?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2440
|
+
}, {
|
|
2441
|
+
"name": "ID Pocket",
|
|
2442
|
+
"link": "WalletConnectV1",
|
|
2443
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/c227ee0a-5127-4707-ded9-c3cd81348d00?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2444
|
+
}, {
|
|
2445
|
+
"name": "CoinCircle",
|
|
2446
|
+
"link": "WalletConnectV1",
|
|
2447
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/eae63a23-c7ba-4f7e-24b3-e6fc69215d00?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2448
|
+
}, {
|
|
2449
|
+
"name": "Dracula Metaverse",
|
|
2450
|
+
"link": "WalletConnectV1",
|
|
2451
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/7259499f-3a9c-4905-d881-19944500d000?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2452
|
+
}, {
|
|
2453
|
+
"name": "SahalWallet",
|
|
2454
|
+
"link": "WalletConnectV1",
|
|
2455
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/d29d6426-b6f2-481b-12d8-7b20ec82af00?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2456
|
+
}, {
|
|
2457
|
+
"name": "UPBOND Wallet",
|
|
2458
|
+
"link": "WalletConnectV1",
|
|
2459
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/698e08f3-b452-4c91-9f65-299939396a00?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2460
|
+
}, {
|
|
2461
|
+
"name": "Sequence Wallet",
|
|
2462
|
+
"link": "WalletConnectV1",
|
|
2463
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/b2d5c39c-a485-4efa-5736-a782204e4a00?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2464
|
+
}, {
|
|
2465
|
+
"name": "LocalTrade Wallet",
|
|
2466
|
+
"link": "WalletConnectV1",
|
|
2467
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/fcc60983-74ae-484a-4242-87cb6f05f100?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2468
|
+
}, {
|
|
2469
|
+
"name": "Loopring Wallet",
|
|
2470
|
+
"link": "WalletConnectV1",
|
|
2471
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/2103feda-4fc8-4635-76a7-02a4ed998000?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2472
|
+
}, {
|
|
2473
|
+
"name": "Vision: Crypto Wallet",
|
|
2474
|
+
"link": "WalletConnectV1",
|
|
2475
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/64ccf07c-1fba-4473-49e8-dc446e5a5000?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2476
|
+
}, {
|
|
2477
|
+
"name": "Ballet Crypto",
|
|
2478
|
+
"link": "WalletConnectV1",
|
|
2479
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/542094e6-70d6-4b0d-4c8f-b61cc2c38500?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2480
|
+
}, {
|
|
2481
|
+
"name": "Pitaka",
|
|
2482
|
+
"link": "WalletConnectV1",
|
|
2483
|
+
"mobile": {
|
|
2484
|
+
"ios": {
|
|
2485
|
+
"native": "pitaka://"
|
|
2486
|
+
},
|
|
2487
|
+
"android": {
|
|
2488
|
+
"native": "pitaka://"
|
|
2489
|
+
}
|
|
2490
|
+
},
|
|
2491
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/691c0716-5213-4b99-e837-079268313800?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2492
|
+
}, {
|
|
2493
|
+
"name": "AbsoluteWallet",
|
|
2494
|
+
"link": "WalletConnectV1",
|
|
2495
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/03797059-fc49-4adc-7b93-503290b62300?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2496
|
+
}, {
|
|
2497
|
+
"name": "The Parallel",
|
|
2498
|
+
"link": "WalletConnectV1",
|
|
2499
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/de73fe0b-0244-4373-dea4-bef78ca82e00?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2500
|
+
}, {
|
|
2501
|
+
"name": "CypherD Wallet",
|
|
2502
|
+
"link": "WalletConnectV1",
|
|
2503
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/6dfec0f3-2cbb-4300-b049-d66d28fcf400?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2504
|
+
}, {
|
|
2505
|
+
"name": "Obvious",
|
|
2506
|
+
"link": "WalletConnectV1",
|
|
2507
|
+
"mobile": {
|
|
2508
|
+
"ios": {
|
|
2509
|
+
"native": "obvious://"
|
|
2510
|
+
},
|
|
2511
|
+
"android": {
|
|
2512
|
+
"native": "obvious://"
|
|
2513
|
+
}
|
|
2514
|
+
},
|
|
2515
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/40945cea-9cd2-4acc-5799-ca7fb31f4700?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2516
|
+
}, {
|
|
2517
|
+
"name": "Keplr",
|
|
2518
|
+
"link": "WalletConnectV1",
|
|
2519
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/527324b0-3849-462b-9a1a-72b53bdfea00?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2520
|
+
}, {
|
|
2521
|
+
"name": "MyWalliD",
|
|
2522
|
+
"link": "WalletConnectV1",
|
|
2523
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/e6cff623-9671-4a39-acc7-1c2292d7e100?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2524
|
+
}, {
|
|
2525
|
+
"name": "Status",
|
|
2526
|
+
"link": "WalletConnectV1",
|
|
2527
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/e131fa98-8c4f-4680-f5b6-6fb77189c900?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2528
|
+
}, {
|
|
2529
|
+
"name": "Monarch Wallet",
|
|
2530
|
+
"link": "WalletConnectV1",
|
|
2531
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/c664d955-8a1e-4460-3917-4cfcf198f000?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2532
|
+
}, {
|
|
2533
|
+
"name": "Marble",
|
|
2534
|
+
"link": "WalletConnectV1",
|
|
2535
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/eb6de921-6824-4f35-6331-8a8b031e7100?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2536
|
+
}, {
|
|
2537
|
+
"name": "Flooz",
|
|
2538
|
+
"link": "WalletConnectV1",
|
|
2539
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/0a04f368-4f56-4c12-0bfa-93b14bb20800?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2540
|
+
}, {
|
|
2541
|
+
"name": "Blockchain.com",
|
|
2542
|
+
"link": "WalletConnectV1",
|
|
2543
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/fc282669-2dbe-44d5-33fc-9168fcf08600?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2544
|
+
}, {
|
|
2545
|
+
"name": "Dohrnii Wallet",
|
|
2546
|
+
"link": "WalletConnectV1",
|
|
2547
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/1bb51ed9-68ed-4012-3082-72dcb7754300?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2548
|
+
}, {
|
|
2549
|
+
"name": "UniPass",
|
|
2550
|
+
"link": "WalletConnectV1",
|
|
2551
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/77865965-4322-4ac4-5049-b2af11bf8300?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2552
|
+
}, {
|
|
2553
|
+
"name": "ZenGo",
|
|
2554
|
+
"link": "WalletConnectV1",
|
|
2555
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/d1794d97-ea1f-4966-be42-9f614bb5d800?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2556
|
+
}, {
|
|
2557
|
+
"name": "Locker Token",
|
|
2558
|
+
"link": "WalletConnectV1",
|
|
2559
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/37401d35-3fa1-451c-802d-604940315800?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2560
|
+
}, {
|
|
2561
|
+
"name": "Keeper",
|
|
2562
|
+
"link": "WalletConnectV1",
|
|
2563
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/41f6ac85-8f4e-4d9f-b37b-92b43fa7f400?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2564
|
+
}, {
|
|
2565
|
+
"name": "XDEFI Wallet",
|
|
2566
|
+
"link": "WalletConnectV1",
|
|
2567
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/efec6318-7f96-4b30-9287-6c287660cd00?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2568
|
+
}, {
|
|
2569
|
+
"name": "BeeWallet",
|
|
2570
|
+
"link": "WalletConnectV1",
|
|
2571
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/ae53ba0b-4d01-42f6-53d8-cc568409b700?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2572
|
+
}, {
|
|
2573
|
+
"name": "Numio",
|
|
2574
|
+
"link": "WalletConnectV1",
|
|
2575
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/416ee463-6699-43f7-c0e3-396f0ad3d300?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2576
|
+
}, {
|
|
2577
|
+
"name": "UvToken",
|
|
2578
|
+
"link": "WalletConnectV1",
|
|
2579
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/a0057241-cd91-4a53-7175-016b76bfd900?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2580
|
+
}, {
|
|
2581
|
+
"name": "Neon Wallet",
|
|
2582
|
+
"link": "WalletConnectV1",
|
|
2583
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/322bd6f0-09b5-4595-cb15-0dfab8054800?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2584
|
+
}, {
|
|
2585
|
+
"name": "Nabox",
|
|
2586
|
+
"link": "WalletConnectV1",
|
|
2587
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/3b75e9f7-2ca8-4a33-ed2b-4e8a0c048d00?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2588
|
+
}, {
|
|
2589
|
+
"name": "Snowball",
|
|
2590
|
+
"link": "WalletConnectV1",
|
|
2591
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/313faea4-af8c-41f4-0ed8-98be5d048e00?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2592
|
+
}, {
|
|
2593
|
+
"name": "KryptoGO Wallet",
|
|
2594
|
+
"link": "WalletConnectV1",
|
|
2595
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/3ccbd966-97e8-45a0-1ceb-6141a8978e00?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2596
|
+
}, {
|
|
2597
|
+
"name": "Payperless",
|
|
2598
|
+
"link": "WalletConnectV1",
|
|
2599
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/4a867e30-44c9-4627-6281-33457b8e2100?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2600
|
+
}, {
|
|
2601
|
+
"name": "Brave Wallet",
|
|
2602
|
+
"link": "WalletConnectV1",
|
|
2603
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/8cecad66-73e3-46ee-f45f-01503c032f00?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2604
|
+
}, {
|
|
2605
|
+
"name": "Crossmint",
|
|
2606
|
+
"link": "WalletConnectV1",
|
|
2607
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/8ad627ec-cbcd-4878-ec5c-3df588055200?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2608
|
+
}, {
|
|
2609
|
+
"name": "Safematrix",
|
|
2610
|
+
"link": "WalletConnectV1",
|
|
2611
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/48ea5de9-869a-4994-2402-97afba060900?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2612
|
+
}, {
|
|
2613
|
+
"name": "pier",
|
|
2614
|
+
"link": "WalletConnectV1",
|
|
2615
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/cf3f0da1-40ec-4940-aebe-df075513d100?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2616
|
+
}, {
|
|
2617
|
+
"name": "FILWallet",
|
|
2618
|
+
"link": "WalletConnectV1",
|
|
2619
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/f400f6c2-ca6c-487b-654d-e119af247500?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2620
|
+
}, {
|
|
2621
|
+
"name": "ParaSwap Wallet",
|
|
2622
|
+
"link": "WalletConnectV1",
|
|
2623
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/73dc6b30-b644-46e6-020c-5926851df600?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2624
|
+
}, {
|
|
2625
|
+
"name": "DopamineApp",
|
|
2626
|
+
"link": "WalletConnectV1",
|
|
2627
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/7ed8ec36-fb7c-4b43-494b-36e907101f00?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2628
|
+
}, {
|
|
2629
|
+
"name": "Bitski",
|
|
2630
|
+
"link": "WalletConnectV1",
|
|
2631
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/94d94cb5-a94f-47cf-70e6-fe8d3f1c3700?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2632
|
+
}, {
|
|
2633
|
+
"name": "Hippo Wallet",
|
|
2634
|
+
"link": "WalletConnectV1",
|
|
2635
|
+
"mobile": {
|
|
2636
|
+
"ios": {
|
|
2637
|
+
"native": "hippowallet://"
|
|
2638
|
+
},
|
|
2639
|
+
"android": {
|
|
2640
|
+
"native": "hippowallet://"
|
|
2641
|
+
}
|
|
2642
|
+
},
|
|
2643
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/f9570968-45f7-47c1-3189-98cf60e25c00?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2644
|
+
}, {
|
|
2645
|
+
"name": "Core",
|
|
2646
|
+
"link": "WalletConnectV1",
|
|
2647
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/35f9c46e-cc57-4aa7-315d-e6ccb2a1d600?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2648
|
+
}, {
|
|
2649
|
+
"name": "Xcapit",
|
|
2650
|
+
"link": "WalletConnectV1",
|
|
2651
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/17f59b75-21b0-4b3f-b024-fe4b9b8d2300?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2652
|
+
}, {
|
|
2653
|
+
"name": "Paper Wallet",
|
|
2654
|
+
"link": "WalletConnectV1",
|
|
2655
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/37d7a10f-d94d-4a56-c30e-267e8afbd500?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2656
|
+
}, {
|
|
2657
|
+
"name": "BC Vault",
|
|
2658
|
+
"link": "WalletConnectV1",
|
|
2659
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/4d7bf99f-b2d9-48b0-5d7e-7d64f9a4f700?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2420
2660
|
}, {
|
|
2421
2661
|
"name": "WalletConnect",
|
|
2422
2662
|
"link": "WalletConnectV1",
|
|
@@ -2541,38 +2781,34 @@ var get = function get() {
|
|
|
2541
2781
|
var ConnectWalletDialog = (function (props) {
|
|
2542
2782
|
var _props$wallet;
|
|
2543
2783
|
var QRCodeElement = React.useRef();
|
|
2544
|
-
var _useState = useState(
|
|
2784
|
+
var _useState = useState(),
|
|
2545
2785
|
_useState2 = _slicedToArray(_useState, 2),
|
|
2546
|
-
|
|
2547
|
-
|
|
2786
|
+
extensionIsAvailable = _useState2[0],
|
|
2787
|
+
setExtensionIsAvailable = _useState2[1];
|
|
2548
2788
|
var _useState3 = useState(),
|
|
2549
2789
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
2550
|
-
|
|
2551
|
-
|
|
2790
|
+
appIsAvailable = _useState4[0],
|
|
2791
|
+
setAppIsAvailable = _useState4[1];
|
|
2552
2792
|
var _useState5 = useState(),
|
|
2553
2793
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
2554
|
-
|
|
2555
|
-
|
|
2794
|
+
linkIsConnected = _useState6[0],
|
|
2795
|
+
setLinkIsConnected = _useState6[1];
|
|
2556
2796
|
var _useState7 = useState(),
|
|
2557
|
-
_useState8 = _slicedToArray(_useState7, 2)
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
var _useState9 = useState(),
|
|
2561
|
-
_useState10 = _slicedToArray(_useState9, 2)
|
|
2562
|
-
_useState10[0]
|
|
2563
|
-
_useState10[1];
|
|
2797
|
+
_useState8 = _slicedToArray(_useState7, 2);
|
|
2798
|
+
_useState8[0];
|
|
2799
|
+
_useState8[1];
|
|
2800
|
+
var _useState9 = useState(false),
|
|
2801
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
2802
|
+
showQRCode = _useState10[0],
|
|
2803
|
+
setShowQRCode = _useState10[1];
|
|
2564
2804
|
var _useState11 = useState(false),
|
|
2565
2805
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
var _useState13 = useState(
|
|
2806
|
+
showLinkCopied = _useState12[0],
|
|
2807
|
+
setShowLinkCopied = _useState12[1];
|
|
2808
|
+
var _useState13 = useState(),
|
|
2569
2809
|
_useState14 = _slicedToArray(_useState13, 2),
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
var _useState15 = useState(),
|
|
2573
|
-
_useState16 = _slicedToArray(_useState15, 2),
|
|
2574
|
-
QRCode = _useState16[0],
|
|
2575
|
-
setQRCode = _useState16[1];
|
|
2810
|
+
QRCode = _useState14[0],
|
|
2811
|
+
setQRCode = _useState14[1];
|
|
2576
2812
|
var _useContext = useContext(NavigateStackContext);
|
|
2577
2813
|
_useContext.navigate;
|
|
2578
2814
|
var header = /*#__PURE__*/React.createElement("div", {
|
|
@@ -2587,20 +2823,6 @@ var ConnectWalletDialog = (function (props) {
|
|
|
2587
2823
|
className: "transparent",
|
|
2588
2824
|
src: props.wallet.logo
|
|
2589
2825
|
})))));
|
|
2590
|
-
var connectExtension = function connectExtension() {
|
|
2591
|
-
setShowConnectExtensionWarning(false);
|
|
2592
|
-
if (extensionIsAvailable) {
|
|
2593
|
-
var wallet = new wallets[props.wallet.extension]();
|
|
2594
|
-
wallet.connect().then(function (account) {
|
|
2595
|
-
props.resolve(account, wallet);
|
|
2596
|
-
})["catch"](function (error) {
|
|
2597
|
-
if ((error === null || error === void 0 ? void 0 : error.code) == -32002) {
|
|
2598
|
-
// Request of type 'wallet_requestPermissions' already pending...
|
|
2599
|
-
setShowConnectExtensionWarning(true);
|
|
2600
|
-
}
|
|
2601
|
-
});
|
|
2602
|
-
}
|
|
2603
|
-
};
|
|
2604
2826
|
var connectViaCopyLink = function connectViaCopyLink() {
|
|
2605
2827
|
var wallet = new wallets[props.wallet.link]();
|
|
2606
2828
|
wallet.connect({
|
|
@@ -2619,29 +2841,6 @@ var ConnectWalletDialog = (function (props) {
|
|
|
2619
2841
|
props.resolve(account, wallet);
|
|
2620
2842
|
});
|
|
2621
2843
|
};
|
|
2622
|
-
var connect = function connect() {
|
|
2623
|
-
if (linkIsConnected) {
|
|
2624
|
-
if (props.wallet.link == 'WalletConnectV1') {
|
|
2625
|
-
wallets[props.wallet.link].getConnectedInstance().then(function (wallet) {
|
|
2626
|
-
if (extensionIsAvailable && wallet.name == wallets[props.wallet.extension].info.name) {
|
|
2627
|
-
return; // extension found and link with same wallet name found (e.g. MetaMask extension + mobile) let user decide!
|
|
2628
|
-
}
|
|
2629
|
-
|
|
2630
|
-
if (props.wallet.name == wallet.name) {
|
|
2631
|
-
return wallet.account().then(function (account) {
|
|
2632
|
-
props.resolve(account, wallet);
|
|
2633
|
-
});
|
|
2634
|
-
} else if (extensionIsAvailable) {
|
|
2635
|
-
connectExtension();
|
|
2636
|
-
}
|
|
2637
|
-
});
|
|
2638
|
-
} else if (props.wallet.link == 'WalletLink') {
|
|
2639
|
-
connectViaQRCode();
|
|
2640
|
-
}
|
|
2641
|
-
} else if (extensionIsAvailable) {
|
|
2642
|
-
connectExtension();
|
|
2643
|
-
}
|
|
2644
|
-
};
|
|
2645
2844
|
var connectViaQRCode = function connectViaQRCode() {
|
|
2646
2845
|
switch (props.wallet.link) {
|
|
2647
2846
|
case 'WalletConnectV1':
|
|
@@ -2746,14 +2945,9 @@ var ConnectWalletDialog = (function (props) {
|
|
|
2746
2945
|
}))();
|
|
2747
2946
|
}, []);
|
|
2748
2947
|
useEffect(function () {
|
|
2749
|
-
if (
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
}
|
|
2753
|
-
if (linkIsConnected == false) {
|
|
2754
|
-
var _props$wallet4, _props$wallet4$deskto;
|
|
2755
|
-
setShowQRCode(!extensionIsAvailable && !isMobile() && !((_props$wallet4 = props.wallet) !== null && _props$wallet4 !== void 0 && (_props$wallet4$deskto = _props$wallet4.desktop) !== null && _props$wallet4$deskto !== void 0 && _props$wallet4$deskto["native"]));
|
|
2756
|
-
}
|
|
2948
|
+
if (linkIsConnected !== undefined) {
|
|
2949
|
+
var _props$wallet4, _props$wallet4$deskto;
|
|
2950
|
+
setShowQRCode(!extensionIsAvailable && !isMobile() && !((_props$wallet4 = props.wallet) !== null && _props$wallet4 !== void 0 && (_props$wallet4$deskto = _props$wallet4.desktop) !== null && _props$wallet4$deskto !== void 0 && _props$wallet4$deskto["native"]));
|
|
2757
2951
|
}
|
|
2758
2952
|
}, [extensionIsAvailable, linkIsConnected]);
|
|
2759
2953
|
useEffect(function () {
|
|
@@ -2787,7 +2981,7 @@ var ConnectWalletDialog = (function (props) {
|
|
|
2787
2981
|
className: "PaddingLeftL PaddingRightL PaddingTopL"
|
|
2788
2982
|
}, extensionIsAvailable && /*#__PURE__*/React.createElement("div", {
|
|
2789
2983
|
className: "PaddingBottomXS"
|
|
2790
|
-
}, showConnectExtensionWarning && /*#__PURE__*/React.createElement("div", {
|
|
2984
|
+
}, props.showConnectExtensionWarning && /*#__PURE__*/React.createElement("div", {
|
|
2791
2985
|
className: "PaddingTopS PaddingBottomS PaddingLeftS PaddingRightS"
|
|
2792
2986
|
}, /*#__PURE__*/React.createElement("div", {
|
|
2793
2987
|
className: "Alert"
|
|
@@ -2795,7 +2989,7 @@ var ConnectWalletDialog = (function (props) {
|
|
|
2795
2989
|
className: "FontWeightBold PaddingBottomXS"
|
|
2796
2990
|
}, "You wallet extension window is already asking to connect. It might be hidden."))), /*#__PURE__*/React.createElement("button", {
|
|
2797
2991
|
onClick: function onClick() {
|
|
2798
|
-
return connectExtension();
|
|
2992
|
+
return props.connectExtension(props.wallet);
|
|
2799
2993
|
},
|
|
2800
2994
|
className: "Card small PaddingTopS PaddingRightXS PaddingBottomS PaddingLeftXS"
|
|
2801
2995
|
}, /*#__PURE__*/React.createElement("span", {
|
|
@@ -3148,45 +3342,64 @@ var SelectWalletDialog = (function (props) {
|
|
|
3148
3342
|
var searchElement = useRef();
|
|
3149
3343
|
var _useContext = useContext(NavigateStackContext),
|
|
3150
3344
|
navigate = _useContext.navigate;
|
|
3151
|
-
var onClickWallet = function onClickWallet(wallet) {
|
|
3152
|
-
if (
|
|
3153
|
-
|
|
3345
|
+
var onClickWallet = function onClickWallet(walletMetaData, wallet) {
|
|
3346
|
+
if (walletMetaData.via == 'detected') {
|
|
3347
|
+
if (walletMetaData.connectionType == 'app') {
|
|
3348
|
+
wallet.account().then(function (account) {
|
|
3349
|
+
if (account) {
|
|
3350
|
+
props.resolve(account, wallet);
|
|
3351
|
+
}
|
|
3352
|
+
});
|
|
3353
|
+
props.setWallet(walletMetaData);
|
|
3354
|
+
navigate('ConnectWallet');
|
|
3355
|
+
} else if (walletMetaData.connectionType == 'extension') {
|
|
3356
|
+
props.setWallet(walletMetaData);
|
|
3357
|
+
props.connectExtension(walletMetaData);
|
|
3358
|
+
navigate('ConnectWallet');
|
|
3359
|
+
}
|
|
3360
|
+
} else {
|
|
3361
|
+
props.connectViaRedirect(walletMetaData);
|
|
3362
|
+
props.setWallet(walletMetaData);
|
|
3363
|
+
navigate('ConnectWallet');
|
|
3154
3364
|
}
|
|
3155
|
-
props.setWallet(wallet);
|
|
3156
|
-
navigate('ConnectWallet');
|
|
3157
3365
|
};
|
|
3158
3366
|
useEffect(function () {
|
|
3159
3367
|
getWallets().then(function (availableWallets) {
|
|
3160
3368
|
var renderedWallets = {}; // prevents rendering same wallet twice (e.g. extension + via walletconnect)
|
|
3161
|
-
var renderWalletElement = function renderWalletElement(
|
|
3162
|
-
if (renderedWallets[
|
|
3369
|
+
var renderWalletElement = function renderWalletElement(walletMetaData, index, type, wallet) {
|
|
3370
|
+
if (renderedWallets[walletMetaData.name] && type == 'previouslyConnected') {
|
|
3163
3371
|
return null;
|
|
3164
3372
|
}
|
|
3165
|
-
renderedWallets[
|
|
3373
|
+
renderedWallets[walletMetaData.name] = true;
|
|
3374
|
+
var connectionType = 'app';
|
|
3375
|
+
if (wallet && wallet.constructor && ![wallets.WalletConnectV1, wallets.WalletLink].includes(wallet.constructor)) {
|
|
3376
|
+
connectionType = 'extension';
|
|
3377
|
+
}
|
|
3166
3378
|
return /*#__PURE__*/React.createElement("div", {
|
|
3167
3379
|
key: index,
|
|
3168
3380
|
className: "PaddingBottomXS"
|
|
3169
3381
|
}, /*#__PURE__*/React.createElement("button", {
|
|
3170
3382
|
type: "button",
|
|
3171
3383
|
className: "Card small",
|
|
3172
|
-
title: "Connect ".concat(
|
|
3384
|
+
title: "Connect ".concat(walletMetaData.name),
|
|
3173
3385
|
onClick: function onClick() {
|
|
3174
|
-
return onClickWallet(_objectSpread$4(_objectSpread$4({},
|
|
3175
|
-
via: type
|
|
3176
|
-
|
|
3386
|
+
return onClickWallet(_objectSpread$4(_objectSpread$4({}, walletMetaData), {}, {
|
|
3387
|
+
via: type,
|
|
3388
|
+
connectionType: connectionType
|
|
3389
|
+
}), wallet);
|
|
3177
3390
|
}
|
|
3178
3391
|
}, /*#__PURE__*/React.createElement("div", {
|
|
3179
3392
|
className: "CardImage"
|
|
3180
3393
|
}, /*#__PURE__*/React.createElement("img", _defineProperty({
|
|
3181
3394
|
className: "transparent",
|
|
3182
|
-
src:
|
|
3395
|
+
src: walletMetaData.logo
|
|
3183
3396
|
}, "className", "WalletLogoS"))), /*#__PURE__*/React.createElement("div", {
|
|
3184
3397
|
className: "CardBody"
|
|
3185
3398
|
}, /*#__PURE__*/React.createElement("div", {
|
|
3186
3399
|
className: "CardBodyWrapper PaddingLeftXS LineHeightXS"
|
|
3187
3400
|
}, /*#__PURE__*/React.createElement("div", {
|
|
3188
3401
|
className: "CardText FontWeightMedium"
|
|
3189
|
-
},
|
|
3402
|
+
}, walletMetaData.name), type != 'previouslyConnected' && /*#__PURE__*/React.createElement("div", {
|
|
3190
3403
|
className: "LightGreen"
|
|
3191
3404
|
}, /*#__PURE__*/React.createElement("span", {
|
|
3192
3405
|
className: "LightGreen",
|
|
@@ -3195,7 +3408,7 @@ var SelectWalletDialog = (function (props) {
|
|
|
3195
3408
|
top: '-1px',
|
|
3196
3409
|
position: 'relative'
|
|
3197
3410
|
}
|
|
3198
|
-
}, "\u25CF"), "
|
|
3411
|
+
}, "\u25CF"), " Connect detected ", connectionType), type == 'previouslyConnected' && /*#__PURE__*/React.createElement("div", {
|
|
3199
3412
|
className: "Opacity05"
|
|
3200
3413
|
}, /*#__PURE__*/React.createElement("span", {
|
|
3201
3414
|
style: {
|
|
@@ -3209,13 +3422,11 @@ var SelectWalletDialog = (function (props) {
|
|
|
3209
3422
|
if (availableWallet.name == 'Phantom') {
|
|
3210
3423
|
return;
|
|
3211
3424
|
}
|
|
3212
|
-
var
|
|
3213
|
-
return wallet.name == availableWallet.name;
|
|
3214
|
-
}) || allWallets.find(function (wallet) {
|
|
3425
|
+
var walletMetaData = allWallets.find(function (wallet) {
|
|
3215
3426
|
return wallet.name == availableWallet.name;
|
|
3216
3427
|
});
|
|
3217
|
-
if (
|
|
3218
|
-
return renderWalletElement(
|
|
3428
|
+
if (walletMetaData) {
|
|
3429
|
+
return renderWalletElement(walletMetaData, index, 'detected', availableWallet);
|
|
3219
3430
|
}
|
|
3220
3431
|
}).filter(function (wallet) {
|
|
3221
3432
|
return !!wallet;
|
|
@@ -3339,6 +3550,10 @@ var ConnectStack = (function (props) {
|
|
|
3339
3550
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
3340
3551
|
selection = _useState4[0];
|
|
3341
3552
|
_useState4[1];
|
|
3553
|
+
var _useState5 = useState(false),
|
|
3554
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
3555
|
+
showConnectExtensionWarning = _useState6[0],
|
|
3556
|
+
setShowConnectExtensionWarning = _useState6[1];
|
|
3342
3557
|
var resolve = function resolve(account, wallet) {
|
|
3343
3558
|
if (account && wallet) {
|
|
3344
3559
|
var walletMeta = allWallets.find(function (walletMeta) {
|
|
@@ -3354,7 +3569,20 @@ var ConnectStack = (function (props) {
|
|
|
3354
3569
|
});
|
|
3355
3570
|
}
|
|
3356
3571
|
};
|
|
3572
|
+
var connectExtension = function connectExtension(wallet) {
|
|
3573
|
+
setShowConnectExtensionWarning(false);
|
|
3574
|
+
wallet = new wallets[wallet.extension]();
|
|
3575
|
+
wallet.connect().then(function (account) {
|
|
3576
|
+
resolve(account, wallet);
|
|
3577
|
+
})["catch"](function (error) {
|
|
3578
|
+
if ((error === null || error === void 0 ? void 0 : error.code) == -32002) {
|
|
3579
|
+
// Request of type 'wallet_requestPermissions' already pending...
|
|
3580
|
+
setShowConnectExtensionWarning(true);
|
|
3581
|
+
}
|
|
3582
|
+
});
|
|
3583
|
+
};
|
|
3357
3584
|
var connectViaRedirect = function connectViaRedirect(walletMetaData) {
|
|
3585
|
+
var reconnect = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
3358
3586
|
var platform = platformForWallet(walletMetaData);
|
|
3359
3587
|
if (!platform) {
|
|
3360
3588
|
return;
|
|
@@ -3364,7 +3592,7 @@ var ConnectStack = (function (props) {
|
|
|
3364
3592
|
_wallet.connect({
|
|
3365
3593
|
name: walletMetaData.name,
|
|
3366
3594
|
logo: walletMetaData.logo,
|
|
3367
|
-
reconnect:
|
|
3595
|
+
reconnect: reconnect,
|
|
3368
3596
|
connect: function connect(_ref) {
|
|
3369
3597
|
var uri = _ref.uri;
|
|
3370
3598
|
var href;
|
|
@@ -3416,14 +3644,17 @@ var ConnectStack = (function (props) {
|
|
|
3416
3644
|
SelectWallet: /*#__PURE__*/React.createElement(SelectWalletDialog, {
|
|
3417
3645
|
setWallet: setWallet,
|
|
3418
3646
|
resolve: resolve,
|
|
3419
|
-
connectViaRedirect: connectViaRedirect
|
|
3647
|
+
connectViaRedirect: connectViaRedirect,
|
|
3648
|
+
connectExtension: connectExtension
|
|
3420
3649
|
}),
|
|
3421
3650
|
WhatIsAWallet: /*#__PURE__*/React.createElement(WhatIsAWalletDialog, null),
|
|
3422
3651
|
ConnectWallet: /*#__PURE__*/React.createElement(ConnectWalletDialog, {
|
|
3423
3652
|
selection: selection,
|
|
3424
3653
|
wallet: wallet,
|
|
3425
3654
|
resolve: resolve,
|
|
3426
|
-
connectViaRedirect: connectViaRedirect
|
|
3655
|
+
connectViaRedirect: connectViaRedirect,
|
|
3656
|
+
connectExtension: connectExtension,
|
|
3657
|
+
showConnectExtensionWarning: showConnectExtensionWarning
|
|
3427
3658
|
})
|
|
3428
3659
|
}
|
|
3429
3660
|
}), /*#__PURE__*/React.createElement(PoweredBy, null));
|
|
@@ -3800,7 +4031,7 @@ var DialogStyle = (function (style) {
|
|
|
3800
4031
|
});
|
|
3801
4032
|
|
|
3802
4033
|
var DropDownStyle = (function (style) {
|
|
3803
|
-
return "\n\n .DropDownWrapper {\n position: relative;\n }\n\n .DropDown {\n background: rgb(240,240,240);\n border-radius: 8px;\n border: 1px solid rgb(230,230,230);\n box-shadow: 0 0 12px rgba(0,0,0,0.1);\n display: block;\n padding: 8px 6px;\n position: absolute;\n right: 0;\n }\n\n .DropDownItem {\n border: 1px solid transparent;\n border-radius: 6px;\n cursor: pointer;\n font-size: 17px;\n font-weight: 500;\n min-width: 160px;\n padding: 6px 10px;\n text-align: left;\n white-space: nowrap;\n }\n\n .DropDownItem:focus {\n border: 1px solid ".concat(style.colors.primary, ";\n }\n\n .DropDownItem:hover {\n background: rgba(0,0,0,0.1);\n }\n \n .DropDownItem:active {\n background: rgba(0,0,0,0.15);\n }\n \n ");
|
|
4034
|
+
return "\n\n .DropDownWrapper {\n position: relative;\n }\n\n .DropDown {\n background: rgb(240,240,240);\n border-radius: 8px;\n border: 1px solid rgb(230,230,230);\n box-shadow: 0 0 12px rgba(0,0,0,0.1);\n display: block;\n padding: 8px 6px;\n position: absolute;\n right: 0;\n z-index: 1000;\n }\n\n .DropDownItem {\n border: 1px solid transparent;\n border-radius: 6px;\n cursor: pointer;\n font-size: 17px;\n font-weight: 500;\n min-width: 160px;\n padding: 6px 10px;\n text-align: left;\n white-space: nowrap;\n }\n\n .DropDownItem:focus {\n border: 1px solid ".concat(style.colors.primary, ";\n }\n\n .DropDownItem:hover {\n background: rgba(0,0,0,0.1);\n }\n \n .DropDownItem:active {\n background: rgba(0,0,0,0.15);\n }\n \n ");
|
|
3804
4035
|
});
|
|
3805
4036
|
|
|
3806
4037
|
var FontStyle = (function (style) {
|
|
@@ -23691,9 +23922,7 @@ var WalletProvider = (function (props) {
|
|
|
23691
23922
|
wallet = _ref.wallet;
|
|
23692
23923
|
setAccount(account);
|
|
23693
23924
|
setWallet(wallet);
|
|
23694
|
-
|
|
23695
|
-
return setWalletState('connected');
|
|
23696
|
-
}, 200); // wait for animation to finish
|
|
23925
|
+
setWalletState('connected');
|
|
23697
23926
|
if (props.connected) {
|
|
23698
23927
|
props.connected(account);
|
|
23699
23928
|
}
|