@ape.swap/bonds-sdk 4.1.3-test.21 → 4.1.3-test.22
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/config/constants/tokens.d.ts +3 -2
- package/dist/main.js +732 -12
- package/package.json +1 -1
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export
|
|
1
|
+
import { ChainId, Token } from '@ape.swap/apeswap-lists';
|
|
2
|
+
export declare const WNATIVE: Partial<Record<ChainId, Token>>;
|
|
3
|
+
export declare const zapInputTokens: Partial<Record<ChainId, Token[]>>;
|
package/dist/main.js
CHANGED
|
@@ -78358,11 +78358,731 @@ function isAddress(value) {
|
|
|
78358
78358
|
}
|
|
78359
78359
|
}
|
|
78360
78360
|
|
|
78361
|
+
const WNATIVE = {
|
|
78362
|
+
[main.ChainId.MAINNET]: {
|
|
78363
|
+
symbol: 'wETH',
|
|
78364
|
+
address: {
|
|
78365
|
+
[main.ChainId.MAINNET]: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2',
|
|
78366
|
+
},
|
|
78367
|
+
decimals: {
|
|
78368
|
+
[main.ChainId.MAINNET]: 18,
|
|
78369
|
+
},
|
|
78370
|
+
active: true,
|
|
78371
|
+
},
|
|
78372
|
+
[main.ChainId.BSC]: {
|
|
78373
|
+
symbol: 'wBNB',
|
|
78374
|
+
address: {
|
|
78375
|
+
[main.ChainId.BSC]: '0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c',
|
|
78376
|
+
},
|
|
78377
|
+
decimals: {
|
|
78378
|
+
[main.ChainId.BSC]: 18,
|
|
78379
|
+
},
|
|
78380
|
+
active: true,
|
|
78381
|
+
},
|
|
78382
|
+
[main.ChainId.MATIC]: {
|
|
78383
|
+
symbol: 'wPOL',
|
|
78384
|
+
address: {
|
|
78385
|
+
[main.ChainId.MATIC]: '0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270',
|
|
78386
|
+
},
|
|
78387
|
+
decimals: {
|
|
78388
|
+
[main.ChainId.MATIC]: 18,
|
|
78389
|
+
},
|
|
78390
|
+
active: true,
|
|
78391
|
+
},
|
|
78392
|
+
[main.ChainId.ARBITRUM]: {
|
|
78393
|
+
symbol: 'wETH',
|
|
78394
|
+
address: {
|
|
78395
|
+
[main.ChainId.ARBITRUM]: '0x82aF49447D8a07e3bd95BD0d56f35241523fBab1',
|
|
78396
|
+
},
|
|
78397
|
+
decimals: {
|
|
78398
|
+
[main.ChainId.ARBITRUM]: 18,
|
|
78399
|
+
},
|
|
78400
|
+
active: true,
|
|
78401
|
+
},
|
|
78402
|
+
[main.ChainId.LINEA]: {
|
|
78403
|
+
symbol: 'wETH',
|
|
78404
|
+
address: {
|
|
78405
|
+
[main.ChainId.LINEA]: '0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f',
|
|
78406
|
+
},
|
|
78407
|
+
decimals: {
|
|
78408
|
+
[main.ChainId.LINEA]: 18,
|
|
78409
|
+
},
|
|
78410
|
+
active: true,
|
|
78411
|
+
},
|
|
78412
|
+
[main.ChainId.BASE]: {
|
|
78413
|
+
symbol: 'wETH',
|
|
78414
|
+
address: {
|
|
78415
|
+
[main.ChainId.BASE]: '0x4200000000000000000000000000000000000006',
|
|
78416
|
+
},
|
|
78417
|
+
decimals: {
|
|
78418
|
+
[main.ChainId.BASE]: 18,
|
|
78419
|
+
},
|
|
78420
|
+
active: true,
|
|
78421
|
+
},
|
|
78422
|
+
[main.ChainId.IOTA]: {
|
|
78423
|
+
symbol: 'wIOTA',
|
|
78424
|
+
address: {
|
|
78425
|
+
[main.ChainId.IOTA]: '0x6e47f8d48a01b44DF3fFF35d258A10A3AEdC114c',
|
|
78426
|
+
},
|
|
78427
|
+
decimals: {
|
|
78428
|
+
[main.ChainId.IOTA]: 18,
|
|
78429
|
+
},
|
|
78430
|
+
active: true,
|
|
78431
|
+
},
|
|
78432
|
+
[main.ChainId.GRAPHLINQ]: {
|
|
78433
|
+
symbol: 'wGLQ',
|
|
78434
|
+
address: {
|
|
78435
|
+
[main.ChainId.GRAPHLINQ]: '0xEB567ec41738c2bAb2599A1070FC5B727721b3B6',
|
|
78436
|
+
},
|
|
78437
|
+
decimals: {
|
|
78438
|
+
[main.ChainId.GRAPHLINQ]: 18,
|
|
78439
|
+
},
|
|
78440
|
+
active: true,
|
|
78441
|
+
},
|
|
78442
|
+
[main.ChainId.BLAST]: {
|
|
78443
|
+
symbol: 'wETH',
|
|
78444
|
+
address: {
|
|
78445
|
+
[main.ChainId.BLAST]: '0x4300000000000000000000000000000000000004',
|
|
78446
|
+
},
|
|
78447
|
+
decimals: {
|
|
78448
|
+
[main.ChainId.BLAST]: 18,
|
|
78449
|
+
},
|
|
78450
|
+
active: true,
|
|
78451
|
+
},
|
|
78452
|
+
[main.ChainId.MONAD_TESTNET]: {
|
|
78453
|
+
symbol: 'wMONAD',
|
|
78454
|
+
address: {
|
|
78455
|
+
[main.ChainId.MONAD_TESTNET]: '0x760AfE86e5de5fa0Ee542fc7B7B713e1c5425701',
|
|
78456
|
+
},
|
|
78457
|
+
decimals: {
|
|
78458
|
+
[main.ChainId.MONAD_TESTNET]: 18,
|
|
78459
|
+
},
|
|
78460
|
+
active: true,
|
|
78461
|
+
},
|
|
78462
|
+
[main.ChainId.SONIC]: {
|
|
78463
|
+
symbol: 'wS',
|
|
78464
|
+
address: {
|
|
78465
|
+
[main.ChainId.SONIC]: '0x039e2fB66102314Ce7b64Ce5Ce3E5183bc94aD38',
|
|
78466
|
+
},
|
|
78467
|
+
decimals: {
|
|
78468
|
+
[main.ChainId.SONIC]: 18,
|
|
78469
|
+
},
|
|
78470
|
+
active: true,
|
|
78471
|
+
},
|
|
78472
|
+
[main.ChainId.BERACHAIN]: {
|
|
78473
|
+
symbol: 'wBERA',
|
|
78474
|
+
address: {
|
|
78475
|
+
[main.ChainId.BERACHAIN]: '0x6969696969696969696969696969696969696969',
|
|
78476
|
+
},
|
|
78477
|
+
decimals: {
|
|
78478
|
+
[main.ChainId.BERACHAIN]: 18,
|
|
78479
|
+
},
|
|
78480
|
+
active: true,
|
|
78481
|
+
},
|
|
78482
|
+
[main.ChainId.AVAX]: {
|
|
78483
|
+
symbol: 'wAVAX',
|
|
78484
|
+
address: {
|
|
78485
|
+
[main.ChainId.AVAX]: '0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7',
|
|
78486
|
+
},
|
|
78487
|
+
decimals: {
|
|
78488
|
+
[main.ChainId.AVAX]: 18,
|
|
78489
|
+
},
|
|
78490
|
+
active: true,
|
|
78491
|
+
},
|
|
78492
|
+
};
|
|
78493
|
+
const zapInputTokens = {
|
|
78494
|
+
[main.ChainId.MAINNET]: [
|
|
78495
|
+
{
|
|
78496
|
+
symbol: 'wETH',
|
|
78497
|
+
address: {
|
|
78498
|
+
[main.ChainId.MAINNET]: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2',
|
|
78499
|
+
},
|
|
78500
|
+
decimals: {
|
|
78501
|
+
[main.ChainId.MAINNET]: 18,
|
|
78502
|
+
},
|
|
78503
|
+
active: true,
|
|
78504
|
+
},
|
|
78505
|
+
{
|
|
78506
|
+
symbol: 'USDC',
|
|
78507
|
+
address: {
|
|
78508
|
+
[main.ChainId.MAINNET]: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
|
|
78509
|
+
},
|
|
78510
|
+
decimals: {
|
|
78511
|
+
[main.ChainId.MAINNET]: 6,
|
|
78512
|
+
},
|
|
78513
|
+
active: true,
|
|
78514
|
+
},
|
|
78515
|
+
{
|
|
78516
|
+
symbol: 'USDT',
|
|
78517
|
+
address: {
|
|
78518
|
+
[main.ChainId.MAINNET]: '0xdAC17F958D2ee523a2206206994597C13D831ec7',
|
|
78519
|
+
},
|
|
78520
|
+
decimals: {
|
|
78521
|
+
[main.ChainId.MAINNET]: 6,
|
|
78522
|
+
},
|
|
78523
|
+
active: true,
|
|
78524
|
+
},
|
|
78525
|
+
{
|
|
78526
|
+
symbol: 'DAI',
|
|
78527
|
+
address: {
|
|
78528
|
+
[main.ChainId.MAINNET]: '0x6B175474E89094C44Da98b954EedeAC495271d0F',
|
|
78529
|
+
},
|
|
78530
|
+
decimals: {
|
|
78531
|
+
[main.ChainId.MAINNET]: 18,
|
|
78532
|
+
},
|
|
78533
|
+
active: true,
|
|
78534
|
+
},
|
|
78535
|
+
{
|
|
78536
|
+
symbol: 'BTC',
|
|
78537
|
+
address: {
|
|
78538
|
+
[main.ChainId.MAINNET]: '0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599',
|
|
78539
|
+
},
|
|
78540
|
+
decimals: {
|
|
78541
|
+
[main.ChainId.MAINNET]: 8,
|
|
78542
|
+
},
|
|
78543
|
+
active: true,
|
|
78544
|
+
// liquidityDex: {
|
|
78545
|
+
// [ChainId.MAINNET]: LiquidityDex.UniswapV3,
|
|
78546
|
+
// },
|
|
78547
|
+
},
|
|
78548
|
+
],
|
|
78549
|
+
[main.ChainId.BSC]: [
|
|
78550
|
+
{
|
|
78551
|
+
symbol: 'wBNB',
|
|
78552
|
+
address: {
|
|
78553
|
+
[main.ChainId.BSC]: '0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c',
|
|
78554
|
+
},
|
|
78555
|
+
decimals: {
|
|
78556
|
+
[main.ChainId.BSC]: 18,
|
|
78557
|
+
},
|
|
78558
|
+
active: true,
|
|
78559
|
+
},
|
|
78560
|
+
{
|
|
78561
|
+
symbol: 'USDC',
|
|
78562
|
+
address: {
|
|
78563
|
+
[main.ChainId.BSC]: '0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d',
|
|
78564
|
+
},
|
|
78565
|
+
decimals: {
|
|
78566
|
+
[main.ChainId.BSC]: 18,
|
|
78567
|
+
},
|
|
78568
|
+
active: true,
|
|
78569
|
+
},
|
|
78570
|
+
{
|
|
78571
|
+
symbol: 'USDT',
|
|
78572
|
+
address: {
|
|
78573
|
+
[main.ChainId.BSC]: '0x55d398326f99059fF775485246999027B3197955',
|
|
78574
|
+
},
|
|
78575
|
+
decimals: {
|
|
78576
|
+
[main.ChainId.BSC]: 18,
|
|
78577
|
+
},
|
|
78578
|
+
active: true,
|
|
78579
|
+
},
|
|
78580
|
+
{
|
|
78581
|
+
symbol: 'DAI',
|
|
78582
|
+
address: {
|
|
78583
|
+
[main.ChainId.BSC]: '0x1AF3F329e8BE154074D8769D1FFa4eE058B1DBc3',
|
|
78584
|
+
},
|
|
78585
|
+
decimals: {
|
|
78586
|
+
[main.ChainId.BSC]: 18,
|
|
78587
|
+
},
|
|
78588
|
+
active: true,
|
|
78589
|
+
},
|
|
78590
|
+
{
|
|
78591
|
+
symbol: 'FDUSD',
|
|
78592
|
+
address: {
|
|
78593
|
+
[main.ChainId.BSC]: '0xc5f0f7b66764F6ec8C8Dff7BA683102295E16409',
|
|
78594
|
+
},
|
|
78595
|
+
decimals: {
|
|
78596
|
+
[main.ChainId.BSC]: 18,
|
|
78597
|
+
},
|
|
78598
|
+
active: true,
|
|
78599
|
+
},
|
|
78600
|
+
{
|
|
78601
|
+
symbol: 'wETH',
|
|
78602
|
+
address: {
|
|
78603
|
+
[main.ChainId.BSC]: '0x2170Ed0880ac9A755fd29B2688956BD959F933F8',
|
|
78604
|
+
},
|
|
78605
|
+
decimals: {
|
|
78606
|
+
[main.ChainId.BSC]: 18,
|
|
78607
|
+
},
|
|
78608
|
+
active: true,
|
|
78609
|
+
},
|
|
78610
|
+
{
|
|
78611
|
+
symbol: 'BTC',
|
|
78612
|
+
address: {
|
|
78613
|
+
[main.ChainId.BSC]: '0x7130d2A12B9BCbFAe4f2634d864A1Ee1Ce3Ead9c',
|
|
78614
|
+
},
|
|
78615
|
+
decimals: {
|
|
78616
|
+
[main.ChainId.BSC]: 18,
|
|
78617
|
+
},
|
|
78618
|
+
active: true,
|
|
78619
|
+
},
|
|
78620
|
+
// WMATIC or WPOL on BNB chain has been commented out up until we have clarity regarding the migration
|
|
78621
|
+
// {
|
|
78622
|
+
// symbol: 'wPOL',
|
|
78623
|
+
// address: {
|
|
78624
|
+
// [ChainId.BSC]: '0xCC42724C6683B7E57334c4E856f4c9965ED682bD',
|
|
78625
|
+
// },
|
|
78626
|
+
// decimals: {
|
|
78627
|
+
// [ChainId.BSC]: 18,
|
|
78628
|
+
// },
|
|
78629
|
+
// active: true,
|
|
78630
|
+
// },
|
|
78631
|
+
{
|
|
78632
|
+
symbol: 'AVAX',
|
|
78633
|
+
address: {
|
|
78634
|
+
[main.ChainId.BSC]: '0x1ce0c2827e2ef14d5c4f29a091d735a204794041',
|
|
78635
|
+
},
|
|
78636
|
+
decimals: {
|
|
78637
|
+
[main.ChainId.BSC]: 18,
|
|
78638
|
+
},
|
|
78639
|
+
active: true,
|
|
78640
|
+
},
|
|
78641
|
+
{
|
|
78642
|
+
symbol: 'ADA',
|
|
78643
|
+
address: {
|
|
78644
|
+
[main.ChainId.BSC]: '0x3ee2200efb3400fabb9aacf31297cbdd1d435d47',
|
|
78645
|
+
},
|
|
78646
|
+
decimals: {
|
|
78647
|
+
[main.ChainId.BSC]: 18,
|
|
78648
|
+
},
|
|
78649
|
+
active: true,
|
|
78650
|
+
},
|
|
78651
|
+
],
|
|
78652
|
+
[main.ChainId.MATIC]: [
|
|
78653
|
+
{
|
|
78654
|
+
symbol: 'wPOL',
|
|
78655
|
+
address: {
|
|
78656
|
+
[main.ChainId.MATIC]: '0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270',
|
|
78657
|
+
},
|
|
78658
|
+
decimals: {
|
|
78659
|
+
[main.ChainId.MATIC]: 18,
|
|
78660
|
+
},
|
|
78661
|
+
active: true,
|
|
78662
|
+
},
|
|
78663
|
+
{
|
|
78664
|
+
symbol: 'USDC.e',
|
|
78665
|
+
address: {
|
|
78666
|
+
[main.ChainId.MATIC]: '0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174',
|
|
78667
|
+
},
|
|
78668
|
+
decimals: {
|
|
78669
|
+
[main.ChainId.MATIC]: 6,
|
|
78670
|
+
},
|
|
78671
|
+
active: true,
|
|
78672
|
+
},
|
|
78673
|
+
{
|
|
78674
|
+
symbol: 'USDC',
|
|
78675
|
+
address: {
|
|
78676
|
+
[main.ChainId.MATIC]: '0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359',
|
|
78677
|
+
},
|
|
78678
|
+
decimals: {
|
|
78679
|
+
[main.ChainId.MATIC]: 6,
|
|
78680
|
+
},
|
|
78681
|
+
active: true,
|
|
78682
|
+
},
|
|
78683
|
+
{
|
|
78684
|
+
symbol: 'USDT',
|
|
78685
|
+
address: {
|
|
78686
|
+
[main.ChainId.MATIC]: '0xc2132D05D31c914a87C6611C10748AEb04B58e8F',
|
|
78687
|
+
},
|
|
78688
|
+
decimals: {
|
|
78689
|
+
[main.ChainId.MATIC]: 6,
|
|
78690
|
+
},
|
|
78691
|
+
active: true,
|
|
78692
|
+
},
|
|
78693
|
+
{
|
|
78694
|
+
symbol: 'DAI',
|
|
78695
|
+
address: {
|
|
78696
|
+
[main.ChainId.MATIC]: '0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063',
|
|
78697
|
+
},
|
|
78698
|
+
decimals: {
|
|
78699
|
+
[main.ChainId.MATIC]: 18,
|
|
78700
|
+
},
|
|
78701
|
+
active: true,
|
|
78702
|
+
},
|
|
78703
|
+
{
|
|
78704
|
+
symbol: 'wETH',
|
|
78705
|
+
address: {
|
|
78706
|
+
[main.ChainId.MATIC]: '0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619',
|
|
78707
|
+
},
|
|
78708
|
+
decimals: {
|
|
78709
|
+
[main.ChainId.MATIC]: 18,
|
|
78710
|
+
},
|
|
78711
|
+
active: true,
|
|
78712
|
+
},
|
|
78713
|
+
{
|
|
78714
|
+
symbol: 'BTC',
|
|
78715
|
+
address: {
|
|
78716
|
+
[main.ChainId.MATIC]: '0x1BFD67037B42Cf73acF2047067bd4F2C47D9BfD6',
|
|
78717
|
+
},
|
|
78718
|
+
decimals: {
|
|
78719
|
+
[main.ChainId.MATIC]: 18,
|
|
78720
|
+
},
|
|
78721
|
+
active: true,
|
|
78722
|
+
},
|
|
78723
|
+
],
|
|
78724
|
+
[main.ChainId.ARBITRUM]: [
|
|
78725
|
+
{
|
|
78726
|
+
symbol: 'wETH',
|
|
78727
|
+
address: {
|
|
78728
|
+
[main.ChainId.ARBITRUM]: '0x82aF49447D8a07e3bd95BD0d56f35241523fBab1',
|
|
78729
|
+
},
|
|
78730
|
+
decimals: {
|
|
78731
|
+
[main.ChainId.ARBITRUM]: 18,
|
|
78732
|
+
},
|
|
78733
|
+
active: true,
|
|
78734
|
+
},
|
|
78735
|
+
{
|
|
78736
|
+
symbol: 'USDC',
|
|
78737
|
+
address: {
|
|
78738
|
+
[main.ChainId.ARBITRUM]: '0xaf88d065e77c8cC2239327C5EDb3A432268e5831', // Circle's USDC, not USDC.e
|
|
78739
|
+
},
|
|
78740
|
+
decimals: {
|
|
78741
|
+
[main.ChainId.ARBITRUM]: 6,
|
|
78742
|
+
},
|
|
78743
|
+
active: true,
|
|
78744
|
+
},
|
|
78745
|
+
{
|
|
78746
|
+
symbol: 'USDT',
|
|
78747
|
+
address: {
|
|
78748
|
+
[main.ChainId.ARBITRUM]: '0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9',
|
|
78749
|
+
},
|
|
78750
|
+
decimals: {
|
|
78751
|
+
[main.ChainId.ARBITRUM]: 6,
|
|
78752
|
+
},
|
|
78753
|
+
active: true,
|
|
78754
|
+
},
|
|
78755
|
+
{
|
|
78756
|
+
symbol: 'DAI',
|
|
78757
|
+
address: {
|
|
78758
|
+
[main.ChainId.ARBITRUM]: '0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1',
|
|
78759
|
+
},
|
|
78760
|
+
decimals: {
|
|
78761
|
+
[main.ChainId.ARBITRUM]: 18,
|
|
78762
|
+
},
|
|
78763
|
+
active: true,
|
|
78764
|
+
},
|
|
78765
|
+
{
|
|
78766
|
+
symbol: 'BTC',
|
|
78767
|
+
address: {
|
|
78768
|
+
[main.ChainId.ARBITRUM]: '0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f',
|
|
78769
|
+
},
|
|
78770
|
+
decimals: {
|
|
78771
|
+
[main.ChainId.ARBITRUM]: 8,
|
|
78772
|
+
},
|
|
78773
|
+
active: true,
|
|
78774
|
+
},
|
|
78775
|
+
{
|
|
78776
|
+
symbol: 'ARB',
|
|
78777
|
+
address: {
|
|
78778
|
+
[main.ChainId.ARBITRUM]: '0x912CE59144191C1204E64559FE8253a0e49E6548',
|
|
78779
|
+
},
|
|
78780
|
+
decimals: {
|
|
78781
|
+
[main.ChainId.ARBITRUM]: 18,
|
|
78782
|
+
},
|
|
78783
|
+
active: true,
|
|
78784
|
+
},
|
|
78785
|
+
],
|
|
78786
|
+
[main.ChainId.LINEA]: [
|
|
78787
|
+
{
|
|
78788
|
+
symbol: 'wETH',
|
|
78789
|
+
address: {
|
|
78790
|
+
[main.ChainId.LINEA]: '0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f',
|
|
78791
|
+
},
|
|
78792
|
+
decimals: {
|
|
78793
|
+
[main.ChainId.LINEA]: 18,
|
|
78794
|
+
},
|
|
78795
|
+
active: true,
|
|
78796
|
+
},
|
|
78797
|
+
{
|
|
78798
|
+
symbol: 'USDC.e',
|
|
78799
|
+
address: {
|
|
78800
|
+
[main.ChainId.LINEA]: '0x176211869cA2b568f2A7D4EE941E073a821EE1ff',
|
|
78801
|
+
},
|
|
78802
|
+
decimals: {
|
|
78803
|
+
[main.ChainId.LINEA]: 6,
|
|
78804
|
+
},
|
|
78805
|
+
active: true,
|
|
78806
|
+
},
|
|
78807
|
+
{
|
|
78808
|
+
symbol: 'USDT',
|
|
78809
|
+
address: {
|
|
78810
|
+
[main.ChainId.LINEA]: '0xA219439258ca9da29E9Cc4cE5596924745e12B93',
|
|
78811
|
+
},
|
|
78812
|
+
decimals: {
|
|
78813
|
+
[main.ChainId.LINEA]: 6,
|
|
78814
|
+
},
|
|
78815
|
+
active: true,
|
|
78816
|
+
},
|
|
78817
|
+
{
|
|
78818
|
+
symbol: 'DAI',
|
|
78819
|
+
address: {
|
|
78820
|
+
[main.ChainId.LINEA]: '0x4AF15ec2A0BD43Db75dd04E62FAA3B8EF36b00d5',
|
|
78821
|
+
},
|
|
78822
|
+
decimals: {
|
|
78823
|
+
[main.ChainId.LINEA]: 18,
|
|
78824
|
+
},
|
|
78825
|
+
active: true,
|
|
78826
|
+
},
|
|
78827
|
+
{
|
|
78828
|
+
symbol: 'BTC',
|
|
78829
|
+
address: {
|
|
78830
|
+
[main.ChainId.LINEA]: '0x3aAB2285ddcDdaD8edf438C1bAB47e1a9D05a9b4',
|
|
78831
|
+
},
|
|
78832
|
+
decimals: {
|
|
78833
|
+
[main.ChainId.LINEA]: 8,
|
|
78834
|
+
},
|
|
78835
|
+
active: true,
|
|
78836
|
+
},
|
|
78837
|
+
// WMATIC or WPOL on Linea chain has been commented out up until we have clarity regarding the migration
|
|
78838
|
+
// {
|
|
78839
|
+
// symbol: 'wPOL',
|
|
78840
|
+
// address: {
|
|
78841
|
+
// [ChainId.LINEA]: '0x265B25e22bcd7f10a5bD6E6410F10537Cc7567e8',
|
|
78842
|
+
// },
|
|
78843
|
+
// decimals: {
|
|
78844
|
+
// [ChainId.LINEA]: 18,
|
|
78845
|
+
// },
|
|
78846
|
+
// active: true,
|
|
78847
|
+
// },
|
|
78848
|
+
],
|
|
78849
|
+
[main.ChainId.BASE]: [
|
|
78850
|
+
{
|
|
78851
|
+
symbol: 'wETH',
|
|
78852
|
+
address: {
|
|
78853
|
+
[main.ChainId.BASE]: '0x4200000000000000000000000000000000000006',
|
|
78854
|
+
},
|
|
78855
|
+
decimals: {
|
|
78856
|
+
[main.ChainId.BASE]: 18,
|
|
78857
|
+
},
|
|
78858
|
+
active: true,
|
|
78859
|
+
},
|
|
78860
|
+
{
|
|
78861
|
+
symbol: 'USDC',
|
|
78862
|
+
address: {
|
|
78863
|
+
[main.ChainId.BASE]: '0x833589fcd6edb6e08f4c7c32d4f71b54bda02913',
|
|
78864
|
+
},
|
|
78865
|
+
decimals: {
|
|
78866
|
+
[main.ChainId.BASE]: 6,
|
|
78867
|
+
},
|
|
78868
|
+
active: true,
|
|
78869
|
+
},
|
|
78870
|
+
{
|
|
78871
|
+
symbol: 'USDT',
|
|
78872
|
+
address: {
|
|
78873
|
+
[main.ChainId.BASE]: '0xfde4C96c8593536E31F229EA8f37b2ADa2699bb2',
|
|
78874
|
+
},
|
|
78875
|
+
decimals: {
|
|
78876
|
+
[main.ChainId.BASE]: 6,
|
|
78877
|
+
},
|
|
78878
|
+
active: true,
|
|
78879
|
+
},
|
|
78880
|
+
{
|
|
78881
|
+
symbol: 'DAI',
|
|
78882
|
+
address: {
|
|
78883
|
+
[main.ChainId.BASE]: '0x50c5725949a6f0c72e6c4a641f24049a917db0cb',
|
|
78884
|
+
},
|
|
78885
|
+
decimals: {
|
|
78886
|
+
[main.ChainId.BASE]: 18,
|
|
78887
|
+
},
|
|
78888
|
+
active: true,
|
|
78889
|
+
},
|
|
78890
|
+
{
|
|
78891
|
+
symbol: 'BTC',
|
|
78892
|
+
address: {
|
|
78893
|
+
[main.ChainId.BASE]: '0x0c41F1FC9022FEB69aF6dc666aBfE73C9FFDA7ce',
|
|
78894
|
+
},
|
|
78895
|
+
decimals: {
|
|
78896
|
+
[main.ChainId.BASE]: 18,
|
|
78897
|
+
},
|
|
78898
|
+
active: true,
|
|
78899
|
+
},
|
|
78900
|
+
],
|
|
78901
|
+
[main.ChainId.BLAST]: [
|
|
78902
|
+
{
|
|
78903
|
+
symbol: 'wETH',
|
|
78904
|
+
address: {
|
|
78905
|
+
[main.ChainId.BLAST]: '0x4300000000000000000000000000000000000004',
|
|
78906
|
+
},
|
|
78907
|
+
decimals: {
|
|
78908
|
+
[main.ChainId.BLAST]: 18,
|
|
78909
|
+
},
|
|
78910
|
+
active: true,
|
|
78911
|
+
},
|
|
78912
|
+
{
|
|
78913
|
+
symbol: 'BTC',
|
|
78914
|
+
address: {
|
|
78915
|
+
[main.ChainId.BLAST]: '0xF7bc58b8D8f97ADC129cfC4c9f45Ce3C0E1D2692',
|
|
78916
|
+
},
|
|
78917
|
+
decimals: {
|
|
78918
|
+
[main.ChainId.BLAST]: 18,
|
|
78919
|
+
},
|
|
78920
|
+
active: true,
|
|
78921
|
+
},
|
|
78922
|
+
{
|
|
78923
|
+
symbol: 'USDe',
|
|
78924
|
+
address: {
|
|
78925
|
+
[main.ChainId.BLAST]: '0x5d3a1ff2b6bab83b63cd9ad0787074081a52ef34',
|
|
78926
|
+
},
|
|
78927
|
+
decimals: {
|
|
78928
|
+
[main.ChainId.BLAST]: 18,
|
|
78929
|
+
},
|
|
78930
|
+
active: true,
|
|
78931
|
+
},
|
|
78932
|
+
],
|
|
78933
|
+
[main.ChainId.BERACHAIN]: [
|
|
78934
|
+
{
|
|
78935
|
+
symbol: 'HONEY',
|
|
78936
|
+
address: {
|
|
78937
|
+
[main.ChainId.BERACHAIN]: '0xFCBD14DC51f0A4d49d5E53C2E0950e0bC26d0Dce',
|
|
78938
|
+
},
|
|
78939
|
+
decimals: {
|
|
78940
|
+
[main.ChainId.BERACHAIN]: 18,
|
|
78941
|
+
},
|
|
78942
|
+
active: true,
|
|
78943
|
+
},
|
|
78944
|
+
{
|
|
78945
|
+
symbol: 'BTC',
|
|
78946
|
+
address: {
|
|
78947
|
+
[main.ChainId.BERACHAIN]: '0x0555E30da8f98308EdB960aa94C0Db47230d2B9c',
|
|
78948
|
+
},
|
|
78949
|
+
decimals: {
|
|
78950
|
+
[main.ChainId.BERACHAIN]: 8,
|
|
78951
|
+
},
|
|
78952
|
+
active: true,
|
|
78953
|
+
},
|
|
78954
|
+
{
|
|
78955
|
+
symbol: 'USDe',
|
|
78956
|
+
address: {
|
|
78957
|
+
[main.ChainId.BERACHAIN]: '0x5d3a1ff2b6bab83b63cd9ad0787074081a52ef34',
|
|
78958
|
+
},
|
|
78959
|
+
decimals: {
|
|
78960
|
+
[main.ChainId.BERACHAIN]: 18,
|
|
78961
|
+
},
|
|
78962
|
+
active: true,
|
|
78963
|
+
},
|
|
78964
|
+
{
|
|
78965
|
+
symbol: 'WETH',
|
|
78966
|
+
address: {
|
|
78967
|
+
[main.ChainId.BERACHAIN]: '0x2F6F07CDcf3588944Bf4C42aC74ff24bF56e7590',
|
|
78968
|
+
},
|
|
78969
|
+
decimals: {
|
|
78970
|
+
[main.ChainId.BERACHAIN]: 18,
|
|
78971
|
+
},
|
|
78972
|
+
active: true,
|
|
78973
|
+
},
|
|
78974
|
+
{
|
|
78975
|
+
symbol: 'USDC.e',
|
|
78976
|
+
address: {
|
|
78977
|
+
[main.ChainId.BERACHAIN]: '0x549943e04f40284185054145c6E4e9568C1D3241',
|
|
78978
|
+
},
|
|
78979
|
+
decimals: {
|
|
78980
|
+
[main.ChainId.BERACHAIN]: 6,
|
|
78981
|
+
},
|
|
78982
|
+
active: true,
|
|
78983
|
+
},
|
|
78984
|
+
],
|
|
78985
|
+
[main.ChainId.SONIC]: [
|
|
78986
|
+
{
|
|
78987
|
+
symbol: 'wS',
|
|
78988
|
+
address: {
|
|
78989
|
+
[main.ChainId.SONIC]: '0x039e2fB66102314Ce7b64Ce5Ce3E5183bc94aD38',
|
|
78990
|
+
},
|
|
78991
|
+
decimals: {
|
|
78992
|
+
[main.ChainId.SONIC]: 18,
|
|
78993
|
+
},
|
|
78994
|
+
active: true,
|
|
78995
|
+
},
|
|
78996
|
+
{
|
|
78997
|
+
symbol: 'USDC',
|
|
78998
|
+
address: {
|
|
78999
|
+
[main.ChainId.SONIC]: '0x29219dd400f2Bf60E5a23d13Be72B486D4038894',
|
|
79000
|
+
},
|
|
79001
|
+
decimals: {
|
|
79002
|
+
[main.ChainId.SONIC]: 6,
|
|
79003
|
+
},
|
|
79004
|
+
active: true,
|
|
79005
|
+
},
|
|
79006
|
+
{
|
|
79007
|
+
symbol: 'USDT',
|
|
79008
|
+
address: {
|
|
79009
|
+
[main.ChainId.SONIC]: '0x6047828dc181963ba44974801FF68e538dA5eaF9',
|
|
79010
|
+
},
|
|
79011
|
+
decimals: {
|
|
79012
|
+
[main.ChainId.SONIC]: 6,
|
|
79013
|
+
},
|
|
79014
|
+
active: true,
|
|
79015
|
+
},
|
|
79016
|
+
{
|
|
79017
|
+
symbol: 'BTC',
|
|
79018
|
+
address: {
|
|
79019
|
+
[main.ChainId.SONIC]: '0x0555E30da8f98308EdB960aa94C0Db47230d2B9c',
|
|
79020
|
+
},
|
|
79021
|
+
decimals: {
|
|
79022
|
+
[main.ChainId.SONIC]: 8,
|
|
79023
|
+
},
|
|
79024
|
+
active: true,
|
|
79025
|
+
},
|
|
79026
|
+
{
|
|
79027
|
+
symbol: 'wETH',
|
|
79028
|
+
address: {
|
|
79029
|
+
[main.ChainId.SONIC]: '0x50c42dEAcD8Fc9773493ED674b675bE577f2634b',
|
|
79030
|
+
},
|
|
79031
|
+
decimals: {
|
|
79032
|
+
[main.ChainId.SONIC]: 18,
|
|
79033
|
+
},
|
|
79034
|
+
active: true,
|
|
79035
|
+
},
|
|
79036
|
+
],
|
|
79037
|
+
[main.ChainId.AVAX]: [
|
|
79038
|
+
{
|
|
79039
|
+
symbol: 'wAVAX',
|
|
79040
|
+
address: {
|
|
79041
|
+
[main.ChainId.AVAX]: '0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7',
|
|
79042
|
+
},
|
|
79043
|
+
decimals: {
|
|
79044
|
+
[main.ChainId.AVAX]: 18,
|
|
79045
|
+
},
|
|
79046
|
+
active: true,
|
|
79047
|
+
},
|
|
79048
|
+
{
|
|
79049
|
+
symbol: 'USDT',
|
|
79050
|
+
address: {
|
|
79051
|
+
[main.ChainId.AVAX]: '0x9702230A8Ea53601f5cD2dc00fDBc13d4dF4A8c7',
|
|
79052
|
+
},
|
|
79053
|
+
decimals: {
|
|
79054
|
+
[main.ChainId.AVAX]: 6,
|
|
79055
|
+
},
|
|
79056
|
+
active: true,
|
|
79057
|
+
},
|
|
79058
|
+
{
|
|
79059
|
+
symbol: 'USDC',
|
|
79060
|
+
address: {
|
|
79061
|
+
[main.ChainId.AVAX]: '0xb97ef9ef8734c71904d8002f8b6bc66dd9c48a6e',
|
|
79062
|
+
},
|
|
79063
|
+
decimals: {
|
|
79064
|
+
[main.ChainId.AVAX]: 6,
|
|
79065
|
+
},
|
|
79066
|
+
active: true,
|
|
79067
|
+
},
|
|
79068
|
+
{
|
|
79069
|
+
symbol: 'BTC',
|
|
79070
|
+
address: {
|
|
79071
|
+
[main.ChainId.AVAX]: '0x0555E30da8f98308EdB960aa94C0Db47230d2B9c',
|
|
79072
|
+
},
|
|
79073
|
+
decimals: {
|
|
79074
|
+
[main.ChainId.AVAX]: 8,
|
|
79075
|
+
},
|
|
79076
|
+
active: true,
|
|
79077
|
+
},
|
|
79078
|
+
],
|
|
79079
|
+
};
|
|
79080
|
+
|
|
78361
79081
|
const getNativeTicker = (chain) => {
|
|
78362
79082
|
var _a;
|
|
78363
79083
|
if (!chain)
|
|
78364
79084
|
return undefined;
|
|
78365
|
-
return (_a =
|
|
79085
|
+
return (_a = WNATIVE[chain]) === null || _a === void 0 ? void 0 : _a.symbol.substring(1);
|
|
78366
79086
|
};
|
|
78367
79087
|
const getTokenSymbol = (token) => {
|
|
78368
79088
|
const nativeSymbols = ['BNB', 'ETH', 'POL', 'IOTA'];
|
|
@@ -78455,7 +79175,7 @@ const getTokensBalance = (account, tokens, chainId, apiUrl) => __awaiter$9(void
|
|
|
78455
79175
|
|
|
78456
79176
|
const useSortedZapList = (chainId, principalToken) => {
|
|
78457
79177
|
var _a;
|
|
78458
|
-
const zapList = [...((_a =
|
|
79178
|
+
const zapList = [...((_a = zapInputTokens[chainId]) !== null && _a !== void 0 ? _a : []), principalToken];
|
|
78459
79179
|
//@ts-ignore
|
|
78460
79180
|
const uniqueTokensList = getUniqueTokensList(zapList, chainId, principalToken);
|
|
78461
79181
|
const { data: tokenPrices } = useTokenPrices();
|
|
@@ -78464,7 +79184,7 @@ const useSortedZapList = (chainId, principalToken) => {
|
|
|
78464
79184
|
return uniqueTokensList
|
|
78465
79185
|
.map((list) => {
|
|
78466
79186
|
var _a, _b;
|
|
78467
|
-
const token = list === 'NATIVE' && chainId ?
|
|
79187
|
+
const token = list === 'NATIVE' && chainId ? WNATIVE[chainId] : list;
|
|
78468
79188
|
const findPrice = (_a = tokenPrices === null || tokenPrices === void 0 ? void 0 : tokenPrices[chainId]) === null || _a === void 0 ? void 0 : _a.find((tokenPrice) => {
|
|
78469
79189
|
var _a, _b, _c;
|
|
78470
79190
|
return tokenPrice.chainId === chainId &&
|
|
@@ -78509,7 +79229,7 @@ const TokenSelectorModal = ({ bondPrincipalToken, handleCurrencySelect, chainId,
|
|
|
78509
79229
|
return !searchQuery
|
|
78510
79230
|
? true
|
|
78511
79231
|
: token.token === 'NATIVE'
|
|
78512
|
-
? (_a =
|
|
79232
|
+
? (_a = WNATIVE[chainId]) === null || _a === void 0 ? void 0 : _a.symbol.toLowerCase().includes(searchQuery.toLowerCase())
|
|
78513
79233
|
: token.token.symbol.toLowerCase().includes(searchQuery.toLowerCase());
|
|
78514
79234
|
})) !== null && _a !== void 0 ? _a : [];
|
|
78515
79235
|
const handleTokenSelect = useCallback((currency) => {
|
|
@@ -78623,7 +79343,7 @@ const getLpType = (protocol) => {
|
|
|
78623
79343
|
function useCurrencyPrice(currency, chainId) {
|
|
78624
79344
|
var _a;
|
|
78625
79345
|
const { data: tokenPrices } = useTokenPrices();
|
|
78626
|
-
const token = currency === 'NATIVE' && chainId ?
|
|
79346
|
+
const token = currency === 'NATIVE' && chainId ? WNATIVE[chainId] : currency;
|
|
78627
79347
|
const tokenAddress = (_a = token === null || token === void 0 ? void 0 : token.address) === null || _a === void 0 ? void 0 : _a[chainId];
|
|
78628
79348
|
return useMemo(() => {
|
|
78629
79349
|
var _a;
|
|
@@ -78760,14 +79480,14 @@ const useSoulZapTokenQuote = (typedValue, inputCurrency, outputToken, chainId, a
|
|
|
78760
79480
|
retry: 1,
|
|
78761
79481
|
});
|
|
78762
79482
|
const zapError = !!error;
|
|
78763
|
-
const tokenList =
|
|
79483
|
+
const tokenList = zapInputTokens[chainId] ? zapInputTokens[chainId] : [];
|
|
78764
79484
|
// toToken0 data
|
|
78765
79485
|
const toToken0Estimate = (_j = (_h = response === null || response === void 0 ? void 0 : response.lpQuote) === null || _h === void 0 ? void 0 : _h.token0) === null || _j === void 0 ? void 0 : _j.fromAmountEstimate;
|
|
78766
79486
|
const toToken0 = (_k = [...tokenList, outputToken]) === null || _k === void 0 ? void 0 : _k.find((token) => { var _a, _b, _c, _d, _e; return ((_b = (_a = token === null || token === void 0 ? void 0 : token.address) === null || _a === void 0 ? void 0 : _a[chainId]) === null || _b === void 0 ? void 0 : _b.toLowerCase()) === ((_e = (_d = (_c = response === null || response === void 0 ? void 0 : response.lpQuote) === null || _c === void 0 ? void 0 : _c.token0) === null || _d === void 0 ? void 0 : _d.address) === null || _e === void 0 ? void 0 : _e.toLowerCase()); });
|
|
78767
79487
|
const toToken0Price = useCurrencyPrice(toToken0 !== null && toToken0 !== void 0 ? toToken0 : null, chainId);
|
|
78768
79488
|
// toToken1 data
|
|
78769
79489
|
const toToken1Estimate = (_m = (_l = response === null || response === void 0 ? void 0 : response.lpQuote) === null || _l === void 0 ? void 0 : _l.token1) === null || _m === void 0 ? void 0 : _m.fromAmountEstimate;
|
|
78770
|
-
const toToken1 = (_o =
|
|
79490
|
+
const toToken1 = (_o = zapInputTokens[chainId]) === null || _o === void 0 ? void 0 : _o.find((token) => { var _a, _b, _c, _d; return ((_a = token.address[chainId]) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === ((_d = (_c = (_b = response === null || response === void 0 ? void 0 : response.lpQuote) === null || _b === void 0 ? void 0 : _b.token1) === null || _c === void 0 ? void 0 : _c.address) === null || _d === void 0 ? void 0 : _d.toLowerCase()); });
|
|
78771
79491
|
const toToken1Price = useCurrencyPrice(toToken1 !== null && toToken1 !== void 0 ? toToken1 : null, chainId);
|
|
78772
79492
|
let toToken0USD = (_r = (_p = new BigNumber$1(toToken0Estimate !== null && toToken0Estimate !== void 0 ? toToken0Estimate : '0')) === null || _p === void 0 ? void 0 : _p.div(new BigNumber$1(10).pow((_q = toToken0 === null || toToken0 === void 0 ? void 0 : toToken0.decimals[chainId]) !== null && _q !== void 0 ? _q : 18)) // this is amount of swap output
|
|
78773
79493
|
) === null || _r === void 0 ? void 0 : _r.times(new BigNumber$1((_s = toToken0Price === null || toToken0Price === void 0 ? void 0 : toToken0Price.price) !== null && _s !== void 0 ? _s : 0)); // convert it to usd price
|
|
@@ -79813,7 +80533,7 @@ const useTokenFromZapList = (tokenString, chainId, principalToken) => {
|
|
|
79813
80533
|
return 'NATIVE';
|
|
79814
80534
|
if (!tokenString || !chainId)
|
|
79815
80535
|
return undefined;
|
|
79816
|
-
const zapList = principalToken ? [...((_a =
|
|
80536
|
+
const zapList = principalToken ? [...((_a = zapInputTokens[chainId]) !== null && _a !== void 0 ? _a : []), principalToken] : zapInputTokens[chainId];
|
|
79817
80537
|
return zapList === null || zapList === void 0 ? void 0 : zapList.find((token) => { var _a; return ((_a = token.address[chainId]) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === (tokenString === null || tokenString === void 0 ? void 0 : tokenString.toLowerCase()); });
|
|
79818
80538
|
};
|
|
79819
80539
|
|
|
@@ -79889,7 +80609,7 @@ const ZapModal = ({ onDismiss, outputToken, account, chainId }) => {
|
|
|
79889
80609
|
const inputTokenPrice = useCurrencyPrice(inputToken !== null && inputToken !== void 0 ? inputToken : null, chainId);
|
|
79890
80610
|
const hasEnoughBalance = new BigNumber$1(typedValue).lte(new BigNumber$1(inputTokenBalance !== null && inputTokenBalance !== void 0 ? inputTokenBalance : '0'));
|
|
79891
80611
|
const isWrap = inputTokenString === 'NATIVE' &&
|
|
79892
|
-
((_b = (_a = outputToken === null || outputToken === void 0 ? void 0 : outputToken.address) === null || _a === void 0 ? void 0 : _a[chainId]) === null || _b === void 0 ? void 0 : _b.toLowerCase()) === ((_e = (_d = (_c =
|
|
80612
|
+
((_b = (_a = outputToken === null || outputToken === void 0 ? void 0 : outputToken.address) === null || _a === void 0 ? void 0 : _a[chainId]) === null || _b === void 0 ? void 0 : _b.toLowerCase()) === ((_e = (_d = (_c = WNATIVE[chainId]) === null || _c === void 0 ? void 0 : _c.address) === null || _d === void 0 ? void 0 : _d[chainId]) === null || _e === void 0 ? void 0 : _e.toLowerCase());
|
|
79893
80613
|
const outputTokenBalanceString = outputTokenBalance ? new BigNumber$1(outputTokenBalance).toPrecision(5) : 'loading';
|
|
79894
80614
|
// Zap Quote
|
|
79895
80615
|
const [fetchingQuote, zapData, outputValue, zapError] = useSoulZapTokenQuote(typedValue, inputToken, outputToken, chainId, account);
|
|
@@ -80104,14 +80824,14 @@ const useSoulZapBondQuote = (typedValue, inputCurrency, bond, account, tierProof
|
|
|
80104
80824
|
retry: 1,
|
|
80105
80825
|
});
|
|
80106
80826
|
const zapError = !!error;
|
|
80107
|
-
const tokenList =
|
|
80827
|
+
const tokenList = zapInputTokens[chainId] ? zapInputTokens[chainId] : [];
|
|
80108
80828
|
// toToken0 data
|
|
80109
80829
|
const toToken0Estimate = (_k = (_j = response === null || response === void 0 ? void 0 : response.lpQuote) === null || _j === void 0 ? void 0 : _j.token0) === null || _k === void 0 ? void 0 : _k.fromAmountEstimate;
|
|
80110
80830
|
const toToken0 = (_l = [...tokenList, principalToken]) === null || _l === void 0 ? void 0 : _l.find((token) => { var _a, _b, _c, _d, _e; return ((_b = (_a = token === null || token === void 0 ? void 0 : token.address) === null || _a === void 0 ? void 0 : _a[chainId]) === null || _b === void 0 ? void 0 : _b.toLowerCase()) === ((_e = (_d = (_c = response === null || response === void 0 ? void 0 : response.lpQuote) === null || _c === void 0 ? void 0 : _c.token0) === null || _d === void 0 ? void 0 : _d.address) === null || _e === void 0 ? void 0 : _e.toLowerCase()); });
|
|
80111
80831
|
const toToken0Price = useCurrencyPrice(toToken0 !== null && toToken0 !== void 0 ? toToken0 : null, chainId);
|
|
80112
80832
|
// toToken1 data
|
|
80113
80833
|
const toToken1Estimate = (_o = (_m = response === null || response === void 0 ? void 0 : response.lpQuote) === null || _m === void 0 ? void 0 : _m.token1) === null || _o === void 0 ? void 0 : _o.fromAmountEstimate;
|
|
80114
|
-
const toToken1 = (_p =
|
|
80834
|
+
const toToken1 = (_p = zapInputTokens[chainId]) === null || _p === void 0 ? void 0 : _p.find((token) => { var _a, _b, _c, _d; return ((_a = token.address[chainId]) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === ((_d = (_c = (_b = response === null || response === void 0 ? void 0 : response.lpQuote) === null || _b === void 0 ? void 0 : _b.token1) === null || _c === void 0 ? void 0 : _c.address) === null || _d === void 0 ? void 0 : _d.toLowerCase()); });
|
|
80115
80835
|
const toToken1Price = useCurrencyPrice(toToken1 !== null && toToken1 !== void 0 ? toToken1 : null, chainId);
|
|
80116
80836
|
let toToken0USD = (_s = (_q = new BigNumber$1(toToken0Estimate !== null && toToken0Estimate !== void 0 ? toToken0Estimate : '0')) === null || _q === void 0 ? void 0 : _q.div(new BigNumber$1(10).pow((_r = toToken0 === null || toToken0 === void 0 ? void 0 : toToken0.decimals[chainId]) !== null && _r !== void 0 ? _r : 18)) // this is amount of swap output
|
|
80117
80837
|
) === null || _s === void 0 ? void 0 : _s.times(new BigNumber$1((_t = toToken0Price === null || toToken0Price === void 0 ? void 0 : toToken0Price.price) !== null && _t !== void 0 ? _t : 0)); // convert it to usd price
|
|
@@ -80126,7 +80846,7 @@ const useSoulZapBondQuote = (typedValue, inputCurrency, bond, account, tierProof
|
|
|
80126
80846
|
const youSpendUSD = toToken0USD.plus(toToken1USD); // youSpendUSD
|
|
80127
80847
|
const estimatedDepositAmount = youSpendUSD.div((_6 = bond === null || bond === void 0 ? void 0 : bond.principalTokenPrice) !== null && _6 !== void 0 ? _6 : '0');
|
|
80128
80848
|
const isWrap = inputCurrency === 'NATIVE' &&
|
|
80129
|
-
((_9 = (_8 = (_7 = bond === null || bond === void 0 ? void 0 : bond.lpToken) === null || _7 === void 0 ? void 0 : _7.address) === null || _8 === void 0 ? void 0 : _8[chainId]) === null || _9 === void 0 ? void 0 : _9.toLowerCase()) === ((_12 = (_11 = (_10 =
|
|
80849
|
+
((_9 = (_8 = (_7 = bond === null || bond === void 0 ? void 0 : bond.lpToken) === null || _7 === void 0 ? void 0 : _7.address) === null || _8 === void 0 ? void 0 : _8[chainId]) === null || _9 === void 0 ? void 0 : _9.toLowerCase()) === ((_12 = (_11 = (_10 = WNATIVE[chainId]) === null || _10 === void 0 ? void 0 : _10.address) === null || _11 === void 0 ? void 0 : _11[chainId]) === null || _12 === void 0 ? void 0 : _12.toLowerCase());
|
|
80130
80850
|
const estimatedDepositAmountToReturn = isWrap ? typedValue : estimatedDepositAmount.toString();
|
|
80131
80851
|
const trueBondPrice = (_13 = response === null || response === void 0 ? void 0 : response.protocolQuote) === null || _13 === void 0 ? void 0 : _13.trueBondPrice;
|
|
80132
80852
|
const zapLoading = isLoading || isFetching;
|