@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/umd/index.js
CHANGED
|
@@ -2411,6 +2411,246 @@
|
|
|
2411
2411
|
}
|
|
2412
2412
|
},
|
|
2413
2413
|
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/f78dab27-7165-4a3d-fdb1-fcff06c0a700?projectId=ec576959c7769a8b4dbbb3da3f12fef4"
|
|
2414
|
+
}, {
|
|
2415
|
+
"name": "Binana",
|
|
2416
|
+
"link": "WalletConnectV1",
|
|
2417
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/65a60845-8fe3-4146-2688-586e4dc68a00?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2418
|
+
}, {
|
|
2419
|
+
"name": "Linen",
|
|
2420
|
+
"link": "WalletConnectV1",
|
|
2421
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/91458f54-aabe-44cf-4788-159ccc733600?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2422
|
+
}, {
|
|
2423
|
+
"name": "Fundamenta Mobile",
|
|
2424
|
+
"link": "WalletConnectV1",
|
|
2425
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/79797f9e-a6c7-4284-1a1c-88332f11ea00?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2426
|
+
}, {
|
|
2427
|
+
"name": "Nitrogen Wallet",
|
|
2428
|
+
"link": "WalletConnectV1",
|
|
2429
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/af185895-cda5-4eaf-e31b-28b6fe4b0800?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2430
|
+
}, {
|
|
2431
|
+
"name": "ApolloX",
|
|
2432
|
+
"link": "WalletConnectV1",
|
|
2433
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/80ab63a2-1b32-4140-3577-9fbc8ea82e00?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2434
|
+
}, {
|
|
2435
|
+
"name": "ID Pocket",
|
|
2436
|
+
"link": "WalletConnectV1",
|
|
2437
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/c227ee0a-5127-4707-ded9-c3cd81348d00?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2438
|
+
}, {
|
|
2439
|
+
"name": "CoinCircle",
|
|
2440
|
+
"link": "WalletConnectV1",
|
|
2441
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/eae63a23-c7ba-4f7e-24b3-e6fc69215d00?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2442
|
+
}, {
|
|
2443
|
+
"name": "Dracula Metaverse",
|
|
2444
|
+
"link": "WalletConnectV1",
|
|
2445
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/7259499f-3a9c-4905-d881-19944500d000?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2446
|
+
}, {
|
|
2447
|
+
"name": "SahalWallet",
|
|
2448
|
+
"link": "WalletConnectV1",
|
|
2449
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/d29d6426-b6f2-481b-12d8-7b20ec82af00?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2450
|
+
}, {
|
|
2451
|
+
"name": "UPBOND Wallet",
|
|
2452
|
+
"link": "WalletConnectV1",
|
|
2453
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/698e08f3-b452-4c91-9f65-299939396a00?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2454
|
+
}, {
|
|
2455
|
+
"name": "Sequence Wallet",
|
|
2456
|
+
"link": "WalletConnectV1",
|
|
2457
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/b2d5c39c-a485-4efa-5736-a782204e4a00?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2458
|
+
}, {
|
|
2459
|
+
"name": "LocalTrade Wallet",
|
|
2460
|
+
"link": "WalletConnectV1",
|
|
2461
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/fcc60983-74ae-484a-4242-87cb6f05f100?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2462
|
+
}, {
|
|
2463
|
+
"name": "Loopring Wallet",
|
|
2464
|
+
"link": "WalletConnectV1",
|
|
2465
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/2103feda-4fc8-4635-76a7-02a4ed998000?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2466
|
+
}, {
|
|
2467
|
+
"name": "Vision: Crypto Wallet",
|
|
2468
|
+
"link": "WalletConnectV1",
|
|
2469
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/64ccf07c-1fba-4473-49e8-dc446e5a5000?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2470
|
+
}, {
|
|
2471
|
+
"name": "Ballet Crypto",
|
|
2472
|
+
"link": "WalletConnectV1",
|
|
2473
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/542094e6-70d6-4b0d-4c8f-b61cc2c38500?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2474
|
+
}, {
|
|
2475
|
+
"name": "Pitaka",
|
|
2476
|
+
"link": "WalletConnectV1",
|
|
2477
|
+
"mobile": {
|
|
2478
|
+
"ios": {
|
|
2479
|
+
"native": "pitaka://"
|
|
2480
|
+
},
|
|
2481
|
+
"android": {
|
|
2482
|
+
"native": "pitaka://"
|
|
2483
|
+
}
|
|
2484
|
+
},
|
|
2485
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/691c0716-5213-4b99-e837-079268313800?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2486
|
+
}, {
|
|
2487
|
+
"name": "AbsoluteWallet",
|
|
2488
|
+
"link": "WalletConnectV1",
|
|
2489
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/03797059-fc49-4adc-7b93-503290b62300?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2490
|
+
}, {
|
|
2491
|
+
"name": "The Parallel",
|
|
2492
|
+
"link": "WalletConnectV1",
|
|
2493
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/de73fe0b-0244-4373-dea4-bef78ca82e00?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2494
|
+
}, {
|
|
2495
|
+
"name": "CypherD Wallet",
|
|
2496
|
+
"link": "WalletConnectV1",
|
|
2497
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/6dfec0f3-2cbb-4300-b049-d66d28fcf400?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2498
|
+
}, {
|
|
2499
|
+
"name": "Obvious",
|
|
2500
|
+
"link": "WalletConnectV1",
|
|
2501
|
+
"mobile": {
|
|
2502
|
+
"ios": {
|
|
2503
|
+
"native": "obvious://"
|
|
2504
|
+
},
|
|
2505
|
+
"android": {
|
|
2506
|
+
"native": "obvious://"
|
|
2507
|
+
}
|
|
2508
|
+
},
|
|
2509
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/40945cea-9cd2-4acc-5799-ca7fb31f4700?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2510
|
+
}, {
|
|
2511
|
+
"name": "Keplr",
|
|
2512
|
+
"link": "WalletConnectV1",
|
|
2513
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/527324b0-3849-462b-9a1a-72b53bdfea00?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2514
|
+
}, {
|
|
2515
|
+
"name": "MyWalliD",
|
|
2516
|
+
"link": "WalletConnectV1",
|
|
2517
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/e6cff623-9671-4a39-acc7-1c2292d7e100?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2518
|
+
}, {
|
|
2519
|
+
"name": "Status",
|
|
2520
|
+
"link": "WalletConnectV1",
|
|
2521
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/e131fa98-8c4f-4680-f5b6-6fb77189c900?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2522
|
+
}, {
|
|
2523
|
+
"name": "Monarch Wallet",
|
|
2524
|
+
"link": "WalletConnectV1",
|
|
2525
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/c664d955-8a1e-4460-3917-4cfcf198f000?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2526
|
+
}, {
|
|
2527
|
+
"name": "Marble",
|
|
2528
|
+
"link": "WalletConnectV1",
|
|
2529
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/eb6de921-6824-4f35-6331-8a8b031e7100?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2530
|
+
}, {
|
|
2531
|
+
"name": "Flooz",
|
|
2532
|
+
"link": "WalletConnectV1",
|
|
2533
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/0a04f368-4f56-4c12-0bfa-93b14bb20800?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2534
|
+
}, {
|
|
2535
|
+
"name": "Blockchain.com",
|
|
2536
|
+
"link": "WalletConnectV1",
|
|
2537
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/fc282669-2dbe-44d5-33fc-9168fcf08600?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2538
|
+
}, {
|
|
2539
|
+
"name": "Dohrnii Wallet",
|
|
2540
|
+
"link": "WalletConnectV1",
|
|
2541
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/1bb51ed9-68ed-4012-3082-72dcb7754300?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2542
|
+
}, {
|
|
2543
|
+
"name": "UniPass",
|
|
2544
|
+
"link": "WalletConnectV1",
|
|
2545
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/77865965-4322-4ac4-5049-b2af11bf8300?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2546
|
+
}, {
|
|
2547
|
+
"name": "ZenGo",
|
|
2548
|
+
"link": "WalletConnectV1",
|
|
2549
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/d1794d97-ea1f-4966-be42-9f614bb5d800?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2550
|
+
}, {
|
|
2551
|
+
"name": "Locker Token",
|
|
2552
|
+
"link": "WalletConnectV1",
|
|
2553
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/37401d35-3fa1-451c-802d-604940315800?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2554
|
+
}, {
|
|
2555
|
+
"name": "Keeper",
|
|
2556
|
+
"link": "WalletConnectV1",
|
|
2557
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/41f6ac85-8f4e-4d9f-b37b-92b43fa7f400?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2558
|
+
}, {
|
|
2559
|
+
"name": "XDEFI Wallet",
|
|
2560
|
+
"link": "WalletConnectV1",
|
|
2561
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/efec6318-7f96-4b30-9287-6c287660cd00?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2562
|
+
}, {
|
|
2563
|
+
"name": "BeeWallet",
|
|
2564
|
+
"link": "WalletConnectV1",
|
|
2565
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/ae53ba0b-4d01-42f6-53d8-cc568409b700?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2566
|
+
}, {
|
|
2567
|
+
"name": "Numio",
|
|
2568
|
+
"link": "WalletConnectV1",
|
|
2569
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/416ee463-6699-43f7-c0e3-396f0ad3d300?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2570
|
+
}, {
|
|
2571
|
+
"name": "UvToken",
|
|
2572
|
+
"link": "WalletConnectV1",
|
|
2573
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/a0057241-cd91-4a53-7175-016b76bfd900?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2574
|
+
}, {
|
|
2575
|
+
"name": "Neon Wallet",
|
|
2576
|
+
"link": "WalletConnectV1",
|
|
2577
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/322bd6f0-09b5-4595-cb15-0dfab8054800?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2578
|
+
}, {
|
|
2579
|
+
"name": "Nabox",
|
|
2580
|
+
"link": "WalletConnectV1",
|
|
2581
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/3b75e9f7-2ca8-4a33-ed2b-4e8a0c048d00?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2582
|
+
}, {
|
|
2583
|
+
"name": "Snowball",
|
|
2584
|
+
"link": "WalletConnectV1",
|
|
2585
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/313faea4-af8c-41f4-0ed8-98be5d048e00?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2586
|
+
}, {
|
|
2587
|
+
"name": "KryptoGO Wallet",
|
|
2588
|
+
"link": "WalletConnectV1",
|
|
2589
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/3ccbd966-97e8-45a0-1ceb-6141a8978e00?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2590
|
+
}, {
|
|
2591
|
+
"name": "Payperless",
|
|
2592
|
+
"link": "WalletConnectV1",
|
|
2593
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/4a867e30-44c9-4627-6281-33457b8e2100?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2594
|
+
}, {
|
|
2595
|
+
"name": "Brave Wallet",
|
|
2596
|
+
"link": "WalletConnectV1",
|
|
2597
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/8cecad66-73e3-46ee-f45f-01503c032f00?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2598
|
+
}, {
|
|
2599
|
+
"name": "Crossmint",
|
|
2600
|
+
"link": "WalletConnectV1",
|
|
2601
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/8ad627ec-cbcd-4878-ec5c-3df588055200?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2602
|
+
}, {
|
|
2603
|
+
"name": "Safematrix",
|
|
2604
|
+
"link": "WalletConnectV1",
|
|
2605
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/48ea5de9-869a-4994-2402-97afba060900?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2606
|
+
}, {
|
|
2607
|
+
"name": "pier",
|
|
2608
|
+
"link": "WalletConnectV1",
|
|
2609
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/cf3f0da1-40ec-4940-aebe-df075513d100?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2610
|
+
}, {
|
|
2611
|
+
"name": "FILWallet",
|
|
2612
|
+
"link": "WalletConnectV1",
|
|
2613
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/f400f6c2-ca6c-487b-654d-e119af247500?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2614
|
+
}, {
|
|
2615
|
+
"name": "ParaSwap Wallet",
|
|
2616
|
+
"link": "WalletConnectV1",
|
|
2617
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/73dc6b30-b644-46e6-020c-5926851df600?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2618
|
+
}, {
|
|
2619
|
+
"name": "DopamineApp",
|
|
2620
|
+
"link": "WalletConnectV1",
|
|
2621
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/7ed8ec36-fb7c-4b43-494b-36e907101f00?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2622
|
+
}, {
|
|
2623
|
+
"name": "Bitski",
|
|
2624
|
+
"link": "WalletConnectV1",
|
|
2625
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/94d94cb5-a94f-47cf-70e6-fe8d3f1c3700?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2626
|
+
}, {
|
|
2627
|
+
"name": "Hippo Wallet",
|
|
2628
|
+
"link": "WalletConnectV1",
|
|
2629
|
+
"mobile": {
|
|
2630
|
+
"ios": {
|
|
2631
|
+
"native": "hippowallet://"
|
|
2632
|
+
},
|
|
2633
|
+
"android": {
|
|
2634
|
+
"native": "hippowallet://"
|
|
2635
|
+
}
|
|
2636
|
+
},
|
|
2637
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/f9570968-45f7-47c1-3189-98cf60e25c00?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2638
|
+
}, {
|
|
2639
|
+
"name": "Core",
|
|
2640
|
+
"link": "WalletConnectV1",
|
|
2641
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/35f9c46e-cc57-4aa7-315d-e6ccb2a1d600?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2642
|
+
}, {
|
|
2643
|
+
"name": "Xcapit",
|
|
2644
|
+
"link": "WalletConnectV1",
|
|
2645
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/17f59b75-21b0-4b3f-b024-fe4b9b8d2300?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2646
|
+
}, {
|
|
2647
|
+
"name": "Paper Wallet",
|
|
2648
|
+
"link": "WalletConnectV1",
|
|
2649
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/37d7a10f-d94d-4a56-c30e-267e8afbd500?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2650
|
+
}, {
|
|
2651
|
+
"name": "BC Vault",
|
|
2652
|
+
"link": "WalletConnectV1",
|
|
2653
|
+
"logo": "https://explorer-api.walletconnect.com/v3/logo/lg/4d7bf99f-b2d9-48b0-5d7e-7d64f9a4f700?projectId=a8d876c6f91c3748db621583fad358f1"
|
|
2414
2654
|
}, {
|
|
2415
2655
|
"name": "WalletConnect",
|
|
2416
2656
|
"link": "WalletConnectV1",
|
|
@@ -2535,38 +2775,34 @@
|
|
|
2535
2775
|
var ConnectWalletDialog = (function (props) {
|
|
2536
2776
|
var _props$wallet;
|
|
2537
2777
|
var QRCodeElement = React__default["default"].useRef();
|
|
2538
|
-
var _useState = React.useState(
|
|
2778
|
+
var _useState = React.useState(),
|
|
2539
2779
|
_useState2 = _slicedToArray(_useState, 2),
|
|
2540
|
-
|
|
2541
|
-
|
|
2780
|
+
extensionIsAvailable = _useState2[0],
|
|
2781
|
+
setExtensionIsAvailable = _useState2[1];
|
|
2542
2782
|
var _useState3 = React.useState(),
|
|
2543
2783
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
2544
|
-
|
|
2545
|
-
|
|
2784
|
+
appIsAvailable = _useState4[0],
|
|
2785
|
+
setAppIsAvailable = _useState4[1];
|
|
2546
2786
|
var _useState5 = React.useState(),
|
|
2547
2787
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
2548
|
-
|
|
2549
|
-
|
|
2788
|
+
linkIsConnected = _useState6[0],
|
|
2789
|
+
setLinkIsConnected = _useState6[1];
|
|
2550
2790
|
var _useState7 = React.useState(),
|
|
2551
|
-
_useState8 = _slicedToArray(_useState7, 2)
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
var _useState9 = React.useState(),
|
|
2555
|
-
_useState10 = _slicedToArray(_useState9, 2)
|
|
2556
|
-
_useState10[0]
|
|
2557
|
-
_useState10[1];
|
|
2791
|
+
_useState8 = _slicedToArray(_useState7, 2);
|
|
2792
|
+
_useState8[0];
|
|
2793
|
+
_useState8[1];
|
|
2794
|
+
var _useState9 = React.useState(false),
|
|
2795
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
2796
|
+
showQRCode = _useState10[0],
|
|
2797
|
+
setShowQRCode = _useState10[1];
|
|
2558
2798
|
var _useState11 = React.useState(false),
|
|
2559
2799
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
var _useState13 = React.useState(
|
|
2800
|
+
showLinkCopied = _useState12[0],
|
|
2801
|
+
setShowLinkCopied = _useState12[1];
|
|
2802
|
+
var _useState13 = React.useState(),
|
|
2563
2803
|
_useState14 = _slicedToArray(_useState13, 2),
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
var _useState15 = React.useState(),
|
|
2567
|
-
_useState16 = _slicedToArray(_useState15, 2),
|
|
2568
|
-
QRCode = _useState16[0],
|
|
2569
|
-
setQRCode = _useState16[1];
|
|
2804
|
+
QRCode = _useState14[0],
|
|
2805
|
+
setQRCode = _useState14[1];
|
|
2570
2806
|
var _useContext = React.useContext(reactDialogStack.NavigateStackContext);
|
|
2571
2807
|
_useContext.navigate;
|
|
2572
2808
|
var header = /*#__PURE__*/React__default["default"].createElement("div", {
|
|
@@ -2581,20 +2817,6 @@
|
|
|
2581
2817
|
className: "transparent",
|
|
2582
2818
|
src: props.wallet.logo
|
|
2583
2819
|
})))));
|
|
2584
|
-
var connectExtension = function connectExtension() {
|
|
2585
|
-
setShowConnectExtensionWarning(false);
|
|
2586
|
-
if (extensionIsAvailable) {
|
|
2587
|
-
var wallet = new web3Wallets.wallets[props.wallet.extension]();
|
|
2588
|
-
wallet.connect().then(function (account) {
|
|
2589
|
-
props.resolve(account, wallet);
|
|
2590
|
-
})["catch"](function (error) {
|
|
2591
|
-
if ((error === null || error === void 0 ? void 0 : error.code) == -32002) {
|
|
2592
|
-
// Request of type 'wallet_requestPermissions' already pending...
|
|
2593
|
-
setShowConnectExtensionWarning(true);
|
|
2594
|
-
}
|
|
2595
|
-
});
|
|
2596
|
-
}
|
|
2597
|
-
};
|
|
2598
2820
|
var connectViaCopyLink = function connectViaCopyLink() {
|
|
2599
2821
|
var wallet = new web3Wallets.wallets[props.wallet.link]();
|
|
2600
2822
|
wallet.connect({
|
|
@@ -2613,29 +2835,6 @@
|
|
|
2613
2835
|
props.resolve(account, wallet);
|
|
2614
2836
|
});
|
|
2615
2837
|
};
|
|
2616
|
-
var connect = function connect() {
|
|
2617
|
-
if (linkIsConnected) {
|
|
2618
|
-
if (props.wallet.link == 'WalletConnectV1') {
|
|
2619
|
-
web3Wallets.wallets[props.wallet.link].getConnectedInstance().then(function (wallet) {
|
|
2620
|
-
if (extensionIsAvailable && wallet.name == web3Wallets.wallets[props.wallet.extension].info.name) {
|
|
2621
|
-
return; // extension found and link with same wallet name found (e.g. MetaMask extension + mobile) let user decide!
|
|
2622
|
-
}
|
|
2623
|
-
|
|
2624
|
-
if (props.wallet.name == wallet.name) {
|
|
2625
|
-
return wallet.account().then(function (account) {
|
|
2626
|
-
props.resolve(account, wallet);
|
|
2627
|
-
});
|
|
2628
|
-
} else if (extensionIsAvailable) {
|
|
2629
|
-
connectExtension();
|
|
2630
|
-
}
|
|
2631
|
-
});
|
|
2632
|
-
} else if (props.wallet.link == 'WalletLink') {
|
|
2633
|
-
connectViaQRCode();
|
|
2634
|
-
}
|
|
2635
|
-
} else if (extensionIsAvailable) {
|
|
2636
|
-
connectExtension();
|
|
2637
|
-
}
|
|
2638
|
-
};
|
|
2639
2838
|
var connectViaQRCode = function connectViaQRCode() {
|
|
2640
2839
|
switch (props.wallet.link) {
|
|
2641
2840
|
case 'WalletConnectV1':
|
|
@@ -2740,14 +2939,9 @@
|
|
|
2740
2939
|
}))();
|
|
2741
2940
|
}, []);
|
|
2742
2941
|
React.useEffect(function () {
|
|
2743
|
-
if (
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
}
|
|
2747
|
-
if (linkIsConnected == false) {
|
|
2748
|
-
var _props$wallet4, _props$wallet4$deskto;
|
|
2749
|
-
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"]));
|
|
2750
|
-
}
|
|
2942
|
+
if (linkIsConnected !== undefined) {
|
|
2943
|
+
var _props$wallet4, _props$wallet4$deskto;
|
|
2944
|
+
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"]));
|
|
2751
2945
|
}
|
|
2752
2946
|
}, [extensionIsAvailable, linkIsConnected]);
|
|
2753
2947
|
React.useEffect(function () {
|
|
@@ -2781,7 +2975,7 @@
|
|
|
2781
2975
|
className: "PaddingLeftL PaddingRightL PaddingTopL"
|
|
2782
2976
|
}, extensionIsAvailable && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2783
2977
|
className: "PaddingBottomXS"
|
|
2784
|
-
}, showConnectExtensionWarning && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2978
|
+
}, props.showConnectExtensionWarning && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2785
2979
|
className: "PaddingTopS PaddingBottomS PaddingLeftS PaddingRightS"
|
|
2786
2980
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2787
2981
|
className: "Alert"
|
|
@@ -2789,7 +2983,7 @@
|
|
|
2789
2983
|
className: "FontWeightBold PaddingBottomXS"
|
|
2790
2984
|
}, "You wallet extension window is already asking to connect. It might be hidden."))), /*#__PURE__*/React__default["default"].createElement("button", {
|
|
2791
2985
|
onClick: function onClick() {
|
|
2792
|
-
return connectExtension();
|
|
2986
|
+
return props.connectExtension(props.wallet);
|
|
2793
2987
|
},
|
|
2794
2988
|
className: "Card small PaddingTopS PaddingRightXS PaddingBottomS PaddingLeftXS"
|
|
2795
2989
|
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
@@ -3142,45 +3336,64 @@
|
|
|
3142
3336
|
var searchElement = React.useRef();
|
|
3143
3337
|
var _useContext = React.useContext(reactDialogStack.NavigateStackContext),
|
|
3144
3338
|
navigate = _useContext.navigate;
|
|
3145
|
-
var onClickWallet = function onClickWallet(wallet) {
|
|
3146
|
-
if (
|
|
3147
|
-
|
|
3339
|
+
var onClickWallet = function onClickWallet(walletMetaData, wallet) {
|
|
3340
|
+
if (walletMetaData.via == 'detected') {
|
|
3341
|
+
if (walletMetaData.connectionType == 'app') {
|
|
3342
|
+
wallet.account().then(function (account) {
|
|
3343
|
+
if (account) {
|
|
3344
|
+
props.resolve(account, wallet);
|
|
3345
|
+
}
|
|
3346
|
+
});
|
|
3347
|
+
props.setWallet(walletMetaData);
|
|
3348
|
+
navigate('ConnectWallet');
|
|
3349
|
+
} else if (walletMetaData.connectionType == 'extension') {
|
|
3350
|
+
props.setWallet(walletMetaData);
|
|
3351
|
+
props.connectExtension(walletMetaData);
|
|
3352
|
+
navigate('ConnectWallet');
|
|
3353
|
+
}
|
|
3354
|
+
} else {
|
|
3355
|
+
props.connectViaRedirect(walletMetaData);
|
|
3356
|
+
props.setWallet(walletMetaData);
|
|
3357
|
+
navigate('ConnectWallet');
|
|
3148
3358
|
}
|
|
3149
|
-
props.setWallet(wallet);
|
|
3150
|
-
navigate('ConnectWallet');
|
|
3151
3359
|
};
|
|
3152
3360
|
React.useEffect(function () {
|
|
3153
3361
|
web3Wallets.getWallets().then(function (availableWallets) {
|
|
3154
3362
|
var renderedWallets = {}; // prevents rendering same wallet twice (e.g. extension + via walletconnect)
|
|
3155
|
-
var renderWalletElement = function renderWalletElement(
|
|
3156
|
-
if (renderedWallets[
|
|
3363
|
+
var renderWalletElement = function renderWalletElement(walletMetaData, index, type, wallet) {
|
|
3364
|
+
if (renderedWallets[walletMetaData.name] && type == 'previouslyConnected') {
|
|
3157
3365
|
return null;
|
|
3158
3366
|
}
|
|
3159
|
-
renderedWallets[
|
|
3367
|
+
renderedWallets[walletMetaData.name] = true;
|
|
3368
|
+
var connectionType = 'app';
|
|
3369
|
+
if (wallet && wallet.constructor && ![web3Wallets.wallets.WalletConnectV1, web3Wallets.wallets.WalletLink].includes(wallet.constructor)) {
|
|
3370
|
+
connectionType = 'extension';
|
|
3371
|
+
}
|
|
3160
3372
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3161
3373
|
key: index,
|
|
3162
3374
|
className: "PaddingBottomXS"
|
|
3163
3375
|
}, /*#__PURE__*/React__default["default"].createElement("button", {
|
|
3164
3376
|
type: "button",
|
|
3165
3377
|
className: "Card small",
|
|
3166
|
-
title: "Connect ".concat(
|
|
3378
|
+
title: "Connect ".concat(walletMetaData.name),
|
|
3167
3379
|
onClick: function onClick() {
|
|
3168
|
-
return onClickWallet(_objectSpread$4(_objectSpread$4({},
|
|
3169
|
-
via: type
|
|
3170
|
-
|
|
3380
|
+
return onClickWallet(_objectSpread$4(_objectSpread$4({}, walletMetaData), {}, {
|
|
3381
|
+
via: type,
|
|
3382
|
+
connectionType: connectionType
|
|
3383
|
+
}), wallet);
|
|
3171
3384
|
}
|
|
3172
3385
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3173
3386
|
className: "CardImage"
|
|
3174
3387
|
}, /*#__PURE__*/React__default["default"].createElement("img", _defineProperty({
|
|
3175
3388
|
className: "transparent",
|
|
3176
|
-
src:
|
|
3389
|
+
src: walletMetaData.logo
|
|
3177
3390
|
}, "className", "WalletLogoS"))), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3178
3391
|
className: "CardBody"
|
|
3179
3392
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3180
3393
|
className: "CardBodyWrapper PaddingLeftXS LineHeightXS"
|
|
3181
3394
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3182
3395
|
className: "CardText FontWeightMedium"
|
|
3183
|
-
},
|
|
3396
|
+
}, walletMetaData.name), type != 'previouslyConnected' && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3184
3397
|
className: "LightGreen"
|
|
3185
3398
|
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
3186
3399
|
className: "LightGreen",
|
|
@@ -3189,7 +3402,7 @@
|
|
|
3189
3402
|
top: '-1px',
|
|
3190
3403
|
position: 'relative'
|
|
3191
3404
|
}
|
|
3192
|
-
}, "\u25CF"), "
|
|
3405
|
+
}, "\u25CF"), " Connect detected ", connectionType), type == 'previouslyConnected' && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3193
3406
|
className: "Opacity05"
|
|
3194
3407
|
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
3195
3408
|
style: {
|
|
@@ -3203,13 +3416,11 @@
|
|
|
3203
3416
|
if (availableWallet.name == 'Phantom') {
|
|
3204
3417
|
return;
|
|
3205
3418
|
}
|
|
3206
|
-
var
|
|
3207
|
-
return wallet.name == availableWallet.name;
|
|
3208
|
-
}) || allWallets.find(function (wallet) {
|
|
3419
|
+
var walletMetaData = allWallets.find(function (wallet) {
|
|
3209
3420
|
return wallet.name == availableWallet.name;
|
|
3210
3421
|
});
|
|
3211
|
-
if (
|
|
3212
|
-
return renderWalletElement(
|
|
3422
|
+
if (walletMetaData) {
|
|
3423
|
+
return renderWalletElement(walletMetaData, index, 'detected', availableWallet);
|
|
3213
3424
|
}
|
|
3214
3425
|
}).filter(function (wallet) {
|
|
3215
3426
|
return !!wallet;
|
|
@@ -3333,6 +3544,10 @@
|
|
|
3333
3544
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
3334
3545
|
selection = _useState4[0];
|
|
3335
3546
|
_useState4[1];
|
|
3547
|
+
var _useState5 = React.useState(false),
|
|
3548
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
3549
|
+
showConnectExtensionWarning = _useState6[0],
|
|
3550
|
+
setShowConnectExtensionWarning = _useState6[1];
|
|
3336
3551
|
var resolve = function resolve(account, wallet) {
|
|
3337
3552
|
if (account && wallet) {
|
|
3338
3553
|
var walletMeta = allWallets.find(function (walletMeta) {
|
|
@@ -3348,7 +3563,20 @@
|
|
|
3348
3563
|
});
|
|
3349
3564
|
}
|
|
3350
3565
|
};
|
|
3566
|
+
var connectExtension = function connectExtension(wallet) {
|
|
3567
|
+
setShowConnectExtensionWarning(false);
|
|
3568
|
+
wallet = new web3Wallets.wallets[wallet.extension]();
|
|
3569
|
+
wallet.connect().then(function (account) {
|
|
3570
|
+
resolve(account, wallet);
|
|
3571
|
+
})["catch"](function (error) {
|
|
3572
|
+
if ((error === null || error === void 0 ? void 0 : error.code) == -32002) {
|
|
3573
|
+
// Request of type 'wallet_requestPermissions' already pending...
|
|
3574
|
+
setShowConnectExtensionWarning(true);
|
|
3575
|
+
}
|
|
3576
|
+
});
|
|
3577
|
+
};
|
|
3351
3578
|
var connectViaRedirect = function connectViaRedirect(walletMetaData) {
|
|
3579
|
+
var reconnect = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
3352
3580
|
var platform = platformForWallet(walletMetaData);
|
|
3353
3581
|
if (!platform) {
|
|
3354
3582
|
return;
|
|
@@ -3358,7 +3586,7 @@
|
|
|
3358
3586
|
_wallet.connect({
|
|
3359
3587
|
name: walletMetaData.name,
|
|
3360
3588
|
logo: walletMetaData.logo,
|
|
3361
|
-
reconnect:
|
|
3589
|
+
reconnect: reconnect,
|
|
3362
3590
|
connect: function connect(_ref) {
|
|
3363
3591
|
var uri = _ref.uri;
|
|
3364
3592
|
var href;
|
|
@@ -3410,14 +3638,17 @@
|
|
|
3410
3638
|
SelectWallet: /*#__PURE__*/React__default["default"].createElement(SelectWalletDialog, {
|
|
3411
3639
|
setWallet: setWallet,
|
|
3412
3640
|
resolve: resolve,
|
|
3413
|
-
connectViaRedirect: connectViaRedirect
|
|
3641
|
+
connectViaRedirect: connectViaRedirect,
|
|
3642
|
+
connectExtension: connectExtension
|
|
3414
3643
|
}),
|
|
3415
3644
|
WhatIsAWallet: /*#__PURE__*/React__default["default"].createElement(WhatIsAWalletDialog, null),
|
|
3416
3645
|
ConnectWallet: /*#__PURE__*/React__default["default"].createElement(ConnectWalletDialog, {
|
|
3417
3646
|
selection: selection,
|
|
3418
3647
|
wallet: wallet,
|
|
3419
3648
|
resolve: resolve,
|
|
3420
|
-
connectViaRedirect: connectViaRedirect
|
|
3649
|
+
connectViaRedirect: connectViaRedirect,
|
|
3650
|
+
connectExtension: connectExtension,
|
|
3651
|
+
showConnectExtensionWarning: showConnectExtensionWarning
|
|
3421
3652
|
})
|
|
3422
3653
|
}
|
|
3423
3654
|
}), /*#__PURE__*/React__default["default"].createElement(PoweredBy, null));
|
|
@@ -3794,7 +4025,7 @@
|
|
|
3794
4025
|
});
|
|
3795
4026
|
|
|
3796
4027
|
var DropDownStyle = (function (style) {
|
|
3797
|
-
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 ");
|
|
4028
|
+
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 ");
|
|
3798
4029
|
});
|
|
3799
4030
|
|
|
3800
4031
|
var FontStyle = (function (style) {
|
|
@@ -23685,9 +23916,7 @@
|
|
|
23685
23916
|
wallet = _ref.wallet;
|
|
23686
23917
|
setAccount(account);
|
|
23687
23918
|
setWallet(wallet);
|
|
23688
|
-
|
|
23689
|
-
return setWalletState('connected');
|
|
23690
|
-
}, 200); // wait for animation to finish
|
|
23919
|
+
setWalletState('connected');
|
|
23691
23920
|
if (props.connected) {
|
|
23692
23921
|
props.connected(account);
|
|
23693
23922
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@depay/widgets",
|
|
3
3
|
"moduleName": "DePayWidgets",
|
|
4
|
-
"version": "10.
|
|
4
|
+
"version": "10.2.0",
|
|
5
5
|
"description": "Web3 Payments with any token. DePay simplifies and improves Web3 Payments with the power of DeFi. Accept any token with on-the-fly conversion.",
|
|
6
6
|
"main": "./dist/umd/index.js",
|
|
7
7
|
"module": "./dist/esm/index.js",
|