@ape.swap/bonds-sdk 4.4.0-test.2 → 4.4.0-test.4

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/main.js CHANGED
@@ -11,7 +11,7 @@ import { getStructDecoder, fixDecoderSize, getU32Decoder, getU8Decoder, getU64De
11
11
  import { useWallet } from '@solana/wallet-adapter-react';
12
12
  import { useWalletModal } from '@solana/wallet-adapter-react-ui';
13
13
  import { ConnectButton as ConnectButton$1 } from '@rainbow-me/rainbowkit';
14
- import { TOKEN_PROGRAM_ID, ASSOCIATED_TOKEN_PROGRAM_ID, getAssociatedTokenAddress, getAccount, createAssociatedTokenAccountInstruction } from '@solana/spl-token';
14
+ import { getAssociatedTokenAddress, getAccount, createAssociatedTokenAccountInstruction, TOKEN_PROGRAM_ID, ASSOCIATED_TOKEN_PROGRAM_ID } from '@solana/spl-token';
15
15
 
16
16
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
17
17
 
@@ -21000,7 +21000,9 @@ function requireZapTokens () {
21000
21000
  _118,
21001
21001
  _119,
21002
21002
  _120,
21003
- _121;
21003
+ _121,
21004
+ _122,
21005
+ _123;
21004
21006
  Object.defineProperty(zapTokens, '__esModule', { value: true });
21005
21007
  zapTokens.zapInputTokens = zapTokens.WNATIVE = void 0;
21006
21008
  var types_1 = requireTypes$1();
@@ -21087,85 +21089,91 @@ function requireZapTokens () {
21087
21089
  decimals: ((_2 = {}), (_2[types_1.ChainId.AVAX] = 18), _2),
21088
21090
  active: true,
21089
21091
  }),
21092
+ (_a[types_1.ChainId.SOL] = {
21093
+ symbol: 'wSOL',
21094
+ address: ((_3 = {}), (_3[types_1.ChainId.SOL] = 'So11111111111111111111111111111111111111112'), _3),
21095
+ decimals: ((_4 = {}), (_4[types_1.ChainId.SOL] = 9), _4),
21096
+ active: true,
21097
+ }),
21090
21098
  _a);
21091
21099
  zapTokens.zapInputTokens =
21092
- ((_3 = {}),
21093
- (_3[types_1.ChainId.MAINNET] = [
21100
+ ((_5 = {}),
21101
+ (_5[types_1.ChainId.MAINNET] = [
21094
21102
  {
21095
21103
  symbol: 'wETH',
21096
- address: ((_4 = {}), (_4[types_1.ChainId.MAINNET] = '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2'), _4),
21097
- decimals: ((_5 = {}), (_5[types_1.ChainId.MAINNET] = 18), _5),
21104
+ address: ((_6 = {}), (_6[types_1.ChainId.MAINNET] = '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2'), _6),
21105
+ decimals: ((_7 = {}), (_7[types_1.ChainId.MAINNET] = 18), _7),
21098
21106
  active: true,
21099
21107
  },
21100
21108
  {
21101
21109
  symbol: 'USDC',
21102
- address: ((_6 = {}), (_6[types_1.ChainId.MAINNET] = '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48'), _6),
21103
- decimals: ((_7 = {}), (_7[types_1.ChainId.MAINNET] = 6), _7),
21110
+ address: ((_8 = {}), (_8[types_1.ChainId.MAINNET] = '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48'), _8),
21111
+ decimals: ((_9 = {}), (_9[types_1.ChainId.MAINNET] = 6), _9),
21104
21112
  active: true,
21105
21113
  },
21106
21114
  {
21107
21115
  symbol: 'USDT',
21108
- address: ((_8 = {}), (_8[types_1.ChainId.MAINNET] = '0xdAC17F958D2ee523a2206206994597C13D831ec7'), _8),
21109
- decimals: ((_9 = {}), (_9[types_1.ChainId.MAINNET] = 6), _9),
21116
+ address: ((_10 = {}), (_10[types_1.ChainId.MAINNET] = '0xdAC17F958D2ee523a2206206994597C13D831ec7'), _10),
21117
+ decimals: ((_11 = {}), (_11[types_1.ChainId.MAINNET] = 6), _11),
21110
21118
  active: true,
21111
21119
  },
21112
21120
  {
21113
21121
  symbol: 'DAI',
21114
- address: ((_10 = {}), (_10[types_1.ChainId.MAINNET] = '0x6B175474E89094C44Da98b954EedeAC495271d0F'), _10),
21115
- decimals: ((_11 = {}), (_11[types_1.ChainId.MAINNET] = 18), _11),
21122
+ address: ((_12 = {}), (_12[types_1.ChainId.MAINNET] = '0x6B175474E89094C44Da98b954EedeAC495271d0F'), _12),
21123
+ decimals: ((_13 = {}), (_13[types_1.ChainId.MAINNET] = 18), _13),
21116
21124
  active: true,
21117
21125
  },
21118
21126
  {
21119
21127
  symbol: 'BTC',
21120
- address: ((_12 = {}), (_12[types_1.ChainId.MAINNET] = '0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599'), _12),
21121
- decimals: ((_13 = {}), (_13[types_1.ChainId.MAINNET] = 8), _13),
21128
+ address: ((_14 = {}), (_14[types_1.ChainId.MAINNET] = '0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599'), _14),
21129
+ decimals: ((_15 = {}), (_15[types_1.ChainId.MAINNET] = 8), _15),
21122
21130
  active: true,
21123
21131
  // liquidityDex: {
21124
21132
  // [ChainId.MAINNET]: LiquidityDex.UniswapV3,
21125
21133
  // },
21126
21134
  },
21127
21135
  ]),
21128
- (_3[types_1.ChainId.BSC] = [
21136
+ (_5[types_1.ChainId.BSC] = [
21129
21137
  {
21130
21138
  symbol: 'wBNB',
21131
- address: ((_14 = {}), (_14[types_1.ChainId.BSC] = '0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c'), _14),
21132
- decimals: ((_15 = {}), (_15[types_1.ChainId.BSC] = 18), _15),
21139
+ address: ((_16 = {}), (_16[types_1.ChainId.BSC] = '0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c'), _16),
21140
+ decimals: ((_17 = {}), (_17[types_1.ChainId.BSC] = 18), _17),
21133
21141
  active: true,
21134
21142
  },
21135
21143
  {
21136
21144
  symbol: 'USDC',
21137
- address: ((_16 = {}), (_16[types_1.ChainId.BSC] = '0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d'), _16),
21138
- decimals: ((_17 = {}), (_17[types_1.ChainId.BSC] = 18), _17),
21145
+ address: ((_18 = {}), (_18[types_1.ChainId.BSC] = '0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d'), _18),
21146
+ decimals: ((_19 = {}), (_19[types_1.ChainId.BSC] = 18), _19),
21139
21147
  active: true,
21140
21148
  },
21141
21149
  {
21142
21150
  symbol: 'USDT',
21143
- address: ((_18 = {}), (_18[types_1.ChainId.BSC] = '0x55d398326f99059fF775485246999027B3197955'), _18),
21144
- decimals: ((_19 = {}), (_19[types_1.ChainId.BSC] = 18), _19),
21151
+ address: ((_20 = {}), (_20[types_1.ChainId.BSC] = '0x55d398326f99059fF775485246999027B3197955'), _20),
21152
+ decimals: ((_21 = {}), (_21[types_1.ChainId.BSC] = 18), _21),
21145
21153
  active: true,
21146
21154
  },
21147
21155
  {
21148
21156
  symbol: 'DAI',
21149
- address: ((_20 = {}), (_20[types_1.ChainId.BSC] = '0x1AF3F329e8BE154074D8769D1FFa4eE058B1DBc3'), _20),
21150
- decimals: ((_21 = {}), (_21[types_1.ChainId.BSC] = 18), _21),
21157
+ address: ((_22 = {}), (_22[types_1.ChainId.BSC] = '0x1AF3F329e8BE154074D8769D1FFa4eE058B1DBc3'), _22),
21158
+ decimals: ((_23 = {}), (_23[types_1.ChainId.BSC] = 18), _23),
21151
21159
  active: true,
21152
21160
  },
21153
21161
  {
21154
21162
  symbol: 'FDUSD',
21155
- address: ((_22 = {}), (_22[types_1.ChainId.BSC] = '0xc5f0f7b66764F6ec8C8Dff7BA683102295E16409'), _22),
21156
- decimals: ((_23 = {}), (_23[types_1.ChainId.BSC] = 18), _23),
21163
+ address: ((_24 = {}), (_24[types_1.ChainId.BSC] = '0xc5f0f7b66764F6ec8C8Dff7BA683102295E16409'), _24),
21164
+ decimals: ((_25 = {}), (_25[types_1.ChainId.BSC] = 18), _25),
21157
21165
  active: true,
21158
21166
  },
21159
21167
  {
21160
21168
  symbol: 'wETH',
21161
- address: ((_24 = {}), (_24[types_1.ChainId.BSC] = '0x2170Ed0880ac9A755fd29B2688956BD959F933F8'), _24),
21162
- decimals: ((_25 = {}), (_25[types_1.ChainId.BSC] = 18), _25),
21169
+ address: ((_26 = {}), (_26[types_1.ChainId.BSC] = '0x2170Ed0880ac9A755fd29B2688956BD959F933F8'), _26),
21170
+ decimals: ((_27 = {}), (_27[types_1.ChainId.BSC] = 18), _27),
21163
21171
  active: true,
21164
21172
  },
21165
21173
  {
21166
21174
  symbol: 'BTC',
21167
- address: ((_26 = {}), (_26[types_1.ChainId.BSC] = '0x7130d2A12B9BCbFAe4f2634d864A1Ee1Ce3Ead9c'), _26),
21168
- decimals: ((_27 = {}), (_27[types_1.ChainId.BSC] = 18), _27),
21175
+ address: ((_28 = {}), (_28[types_1.ChainId.BSC] = '0x7130d2A12B9BCbFAe4f2634d864A1Ee1Ce3Ead9c'), _28),
21176
+ decimals: ((_29 = {}), (_29[types_1.ChainId.BSC] = 18), _29),
21169
21177
  active: true,
21170
21178
  },
21171
21179
  // WMATIC or WPOL on BNB chain has been commented out up until we have clarity regarding the migration
@@ -21181,128 +21189,128 @@ function requireZapTokens () {
21181
21189
  // },
21182
21190
  {
21183
21191
  symbol: 'AVAX',
21184
- address: ((_28 = {}), (_28[types_1.ChainId.BSC] = '0x1ce0c2827e2ef14d5c4f29a091d735a204794041'), _28),
21185
- decimals: ((_29 = {}), (_29[types_1.ChainId.BSC] = 18), _29),
21192
+ address: ((_30 = {}), (_30[types_1.ChainId.BSC] = '0x1ce0c2827e2ef14d5c4f29a091d735a204794041'), _30),
21193
+ decimals: ((_31 = {}), (_31[types_1.ChainId.BSC] = 18), _31),
21186
21194
  active: true,
21187
21195
  },
21188
21196
  {
21189
21197
  symbol: 'ADA',
21190
- address: ((_30 = {}), (_30[types_1.ChainId.BSC] = '0x3ee2200efb3400fabb9aacf31297cbdd1d435d47'), _30),
21191
- decimals: ((_31 = {}), (_31[types_1.ChainId.BSC] = 18), _31),
21198
+ address: ((_32 = {}), (_32[types_1.ChainId.BSC] = '0x3ee2200efb3400fabb9aacf31297cbdd1d435d47'), _32),
21199
+ decimals: ((_33 = {}), (_33[types_1.ChainId.BSC] = 18), _33),
21192
21200
  active: true,
21193
21201
  },
21194
21202
  ]),
21195
- (_3[types_1.ChainId.MATIC] = [
21203
+ (_5[types_1.ChainId.MATIC] = [
21196
21204
  {
21197
21205
  symbol: 'wPOL',
21198
- address: ((_32 = {}), (_32[types_1.ChainId.MATIC] = '0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270'), _32),
21199
- decimals: ((_33 = {}), (_33[types_1.ChainId.MATIC] = 18), _33),
21206
+ address: ((_34 = {}), (_34[types_1.ChainId.MATIC] = '0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270'), _34),
21207
+ decimals: ((_35 = {}), (_35[types_1.ChainId.MATIC] = 18), _35),
21200
21208
  active: true,
21201
21209
  },
21202
21210
  {
21203
21211
  symbol: 'USDC.e',
21204
- address: ((_34 = {}), (_34[types_1.ChainId.MATIC] = '0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174'), _34),
21205
- decimals: ((_35 = {}), (_35[types_1.ChainId.MATIC] = 6), _35),
21212
+ address: ((_36 = {}), (_36[types_1.ChainId.MATIC] = '0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174'), _36),
21213
+ decimals: ((_37 = {}), (_37[types_1.ChainId.MATIC] = 6), _37),
21206
21214
  active: true,
21207
21215
  },
21208
21216
  {
21209
21217
  symbol: 'USDC',
21210
- address: ((_36 = {}), (_36[types_1.ChainId.MATIC] = '0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359'), _36),
21211
- decimals: ((_37 = {}), (_37[types_1.ChainId.MATIC] = 6), _37),
21218
+ address: ((_38 = {}), (_38[types_1.ChainId.MATIC] = '0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359'), _38),
21219
+ decimals: ((_39 = {}), (_39[types_1.ChainId.MATIC] = 6), _39),
21212
21220
  active: true,
21213
21221
  },
21214
21222
  {
21215
21223
  symbol: 'USDT',
21216
- address: ((_38 = {}), (_38[types_1.ChainId.MATIC] = '0xc2132D05D31c914a87C6611C10748AEb04B58e8F'), _38),
21217
- decimals: ((_39 = {}), (_39[types_1.ChainId.MATIC] = 6), _39),
21224
+ address: ((_40 = {}), (_40[types_1.ChainId.MATIC] = '0xc2132D05D31c914a87C6611C10748AEb04B58e8F'), _40),
21225
+ decimals: ((_41 = {}), (_41[types_1.ChainId.MATIC] = 6), _41),
21218
21226
  active: true,
21219
21227
  },
21220
21228
  {
21221
21229
  symbol: 'DAI',
21222
- address: ((_40 = {}), (_40[types_1.ChainId.MATIC] = '0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063'), _40),
21223
- decimals: ((_41 = {}), (_41[types_1.ChainId.MATIC] = 18), _41),
21230
+ address: ((_42 = {}), (_42[types_1.ChainId.MATIC] = '0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063'), _42),
21231
+ decimals: ((_43 = {}), (_43[types_1.ChainId.MATIC] = 18), _43),
21224
21232
  active: true,
21225
21233
  },
21226
21234
  {
21227
21235
  symbol: 'wETH',
21228
- address: ((_42 = {}), (_42[types_1.ChainId.MATIC] = '0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619'), _42),
21229
- decimals: ((_43 = {}), (_43[types_1.ChainId.MATIC] = 18), _43),
21236
+ address: ((_44 = {}), (_44[types_1.ChainId.MATIC] = '0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619'), _44),
21237
+ decimals: ((_45 = {}), (_45[types_1.ChainId.MATIC] = 18), _45),
21230
21238
  active: true,
21231
21239
  },
21232
21240
  {
21233
21241
  symbol: 'BTC',
21234
- address: ((_44 = {}), (_44[types_1.ChainId.MATIC] = '0x1BFD67037B42Cf73acF2047067bd4F2C47D9BfD6'), _44),
21235
- decimals: ((_45 = {}), (_45[types_1.ChainId.MATIC] = 18), _45),
21242
+ address: ((_46 = {}), (_46[types_1.ChainId.MATIC] = '0x1BFD67037B42Cf73acF2047067bd4F2C47D9BfD6'), _46),
21243
+ decimals: ((_47 = {}), (_47[types_1.ChainId.MATIC] = 18), _47),
21236
21244
  active: true,
21237
21245
  },
21238
21246
  ]),
21239
- (_3[types_1.ChainId.ARBITRUM] = [
21247
+ (_5[types_1.ChainId.ARBITRUM] = [
21240
21248
  {
21241
21249
  symbol: 'wETH',
21242
- address: ((_46 = {}), (_46[types_1.ChainId.ARBITRUM] = '0x82aF49447D8a07e3bd95BD0d56f35241523fBab1'), _46),
21243
- decimals: ((_47 = {}), (_47[types_1.ChainId.ARBITRUM] = 18), _47),
21250
+ address: ((_48 = {}), (_48[types_1.ChainId.ARBITRUM] = '0x82aF49447D8a07e3bd95BD0d56f35241523fBab1'), _48),
21251
+ decimals: ((_49 = {}), (_49[types_1.ChainId.ARBITRUM] = 18), _49),
21244
21252
  active: true,
21245
21253
  },
21246
21254
  {
21247
21255
  symbol: 'USDC',
21248
- address: ((_48 = {}), (_48[types_1.ChainId.ARBITRUM] = '0xaf88d065e77c8cC2239327C5EDb3A432268e5831'), _48),
21249
- decimals: ((_49 = {}), (_49[types_1.ChainId.ARBITRUM] = 6), _49),
21256
+ address: ((_50 = {}), (_50[types_1.ChainId.ARBITRUM] = '0xaf88d065e77c8cC2239327C5EDb3A432268e5831'), _50),
21257
+ decimals: ((_51 = {}), (_51[types_1.ChainId.ARBITRUM] = 6), _51),
21250
21258
  active: true,
21251
21259
  },
21252
21260
  {
21253
21261
  symbol: 'USDT',
21254
- address: ((_50 = {}), (_50[types_1.ChainId.ARBITRUM] = '0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9'), _50),
21255
- decimals: ((_51 = {}), (_51[types_1.ChainId.ARBITRUM] = 6), _51),
21262
+ address: ((_52 = {}), (_52[types_1.ChainId.ARBITRUM] = '0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9'), _52),
21263
+ decimals: ((_53 = {}), (_53[types_1.ChainId.ARBITRUM] = 6), _53),
21256
21264
  active: true,
21257
21265
  },
21258
21266
  {
21259
21267
  symbol: 'DAI',
21260
- address: ((_52 = {}), (_52[types_1.ChainId.ARBITRUM] = '0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1'), _52),
21261
- decimals: ((_53 = {}), (_53[types_1.ChainId.ARBITRUM] = 18), _53),
21268
+ address: ((_54 = {}), (_54[types_1.ChainId.ARBITRUM] = '0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1'), _54),
21269
+ decimals: ((_55 = {}), (_55[types_1.ChainId.ARBITRUM] = 18), _55),
21262
21270
  active: true,
21263
21271
  },
21264
21272
  {
21265
21273
  symbol: 'BTC',
21266
- address: ((_54 = {}), (_54[types_1.ChainId.ARBITRUM] = '0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f'), _54),
21267
- decimals: ((_55 = {}), (_55[types_1.ChainId.ARBITRUM] = 8), _55),
21274
+ address: ((_56 = {}), (_56[types_1.ChainId.ARBITRUM] = '0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f'), _56),
21275
+ decimals: ((_57 = {}), (_57[types_1.ChainId.ARBITRUM] = 8), _57),
21268
21276
  active: true,
21269
21277
  },
21270
21278
  {
21271
21279
  symbol: 'ARB',
21272
- address: ((_56 = {}), (_56[types_1.ChainId.ARBITRUM] = '0x912CE59144191C1204E64559FE8253a0e49E6548'), _56),
21273
- decimals: ((_57 = {}), (_57[types_1.ChainId.ARBITRUM] = 18), _57),
21280
+ address: ((_58 = {}), (_58[types_1.ChainId.ARBITRUM] = '0x912CE59144191C1204E64559FE8253a0e49E6548'), _58),
21281
+ decimals: ((_59 = {}), (_59[types_1.ChainId.ARBITRUM] = 18), _59),
21274
21282
  active: true,
21275
21283
  },
21276
21284
  ]),
21277
- (_3[types_1.ChainId.LINEA] = [
21285
+ (_5[types_1.ChainId.LINEA] = [
21278
21286
  {
21279
21287
  symbol: 'wETH',
21280
- address: ((_58 = {}), (_58[types_1.ChainId.LINEA] = '0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f'), _58),
21281
- decimals: ((_59 = {}), (_59[types_1.ChainId.LINEA] = 18), _59),
21288
+ address: ((_60 = {}), (_60[types_1.ChainId.LINEA] = '0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f'), _60),
21289
+ decimals: ((_61 = {}), (_61[types_1.ChainId.LINEA] = 18), _61),
21282
21290
  active: true,
21283
21291
  },
21284
21292
  {
21285
21293
  symbol: 'USDC.e',
21286
- address: ((_60 = {}), (_60[types_1.ChainId.LINEA] = '0x176211869cA2b568f2A7D4EE941E073a821EE1ff'), _60),
21287
- decimals: ((_61 = {}), (_61[types_1.ChainId.LINEA] = 6), _61),
21294
+ address: ((_62 = {}), (_62[types_1.ChainId.LINEA] = '0x176211869cA2b568f2A7D4EE941E073a821EE1ff'), _62),
21295
+ decimals: ((_63 = {}), (_63[types_1.ChainId.LINEA] = 6), _63),
21288
21296
  active: true,
21289
21297
  },
21290
21298
  {
21291
21299
  symbol: 'USDT',
21292
- address: ((_62 = {}), (_62[types_1.ChainId.LINEA] = '0xA219439258ca9da29E9Cc4cE5596924745e12B93'), _62),
21293
- decimals: ((_63 = {}), (_63[types_1.ChainId.LINEA] = 6), _63),
21300
+ address: ((_64 = {}), (_64[types_1.ChainId.LINEA] = '0xA219439258ca9da29E9Cc4cE5596924745e12B93'), _64),
21301
+ decimals: ((_65 = {}), (_65[types_1.ChainId.LINEA] = 6), _65),
21294
21302
  active: true,
21295
21303
  },
21296
21304
  {
21297
21305
  symbol: 'DAI',
21298
- address: ((_64 = {}), (_64[types_1.ChainId.LINEA] = '0x4AF15ec2A0BD43Db75dd04E62FAA3B8EF36b00d5'), _64),
21299
- decimals: ((_65 = {}), (_65[types_1.ChainId.LINEA] = 18), _65),
21306
+ address: ((_66 = {}), (_66[types_1.ChainId.LINEA] = '0x4AF15ec2A0BD43Db75dd04E62FAA3B8EF36b00d5'), _66),
21307
+ decimals: ((_67 = {}), (_67[types_1.ChainId.LINEA] = 18), _67),
21300
21308
  active: true,
21301
21309
  },
21302
21310
  {
21303
21311
  symbol: 'BTC',
21304
- address: ((_66 = {}), (_66[types_1.ChainId.LINEA] = '0x3aAB2285ddcDdaD8edf438C1bAB47e1a9D05a9b4'), _66),
21305
- decimals: ((_67 = {}), (_67[types_1.ChainId.LINEA] = 8), _67),
21312
+ address: ((_68 = {}), (_68[types_1.ChainId.LINEA] = '0x3aAB2285ddcDdaD8edf438C1bAB47e1a9D05a9b4'), _68),
21313
+ decimals: ((_69 = {}), (_69[types_1.ChainId.LINEA] = 8), _69),
21306
21314
  active: true,
21307
21315
  },
21308
21316
  // WMATIC or WPOL on Linea chain has been commented out up until we have clarity regarding the migration
@@ -21317,181 +21325,181 @@ function requireZapTokens () {
21317
21325
  // active: true,
21318
21326
  // },
21319
21327
  ]),
21320
- (_3[types_1.ChainId.BASE] = [
21328
+ (_5[types_1.ChainId.BASE] = [
21321
21329
  {
21322
21330
  symbol: 'wETH',
21323
- address: ((_68 = {}), (_68[types_1.ChainId.BASE] = '0x4200000000000000000000000000000000000006'), _68),
21324
- decimals: ((_69 = {}), (_69[types_1.ChainId.BASE] = 18), _69),
21331
+ address: ((_70 = {}), (_70[types_1.ChainId.BASE] = '0x4200000000000000000000000000000000000006'), _70),
21332
+ decimals: ((_71 = {}), (_71[types_1.ChainId.BASE] = 18), _71),
21325
21333
  active: true,
21326
21334
  },
21327
21335
  {
21328
21336
  symbol: 'USDC',
21329
- address: ((_70 = {}), (_70[types_1.ChainId.BASE] = '0x833589fcd6edb6e08f4c7c32d4f71b54bda02913'), _70),
21330
- decimals: ((_71 = {}), (_71[types_1.ChainId.BASE] = 6), _71),
21337
+ address: ((_72 = {}), (_72[types_1.ChainId.BASE] = '0x833589fcd6edb6e08f4c7c32d4f71b54bda02913'), _72),
21338
+ decimals: ((_73 = {}), (_73[types_1.ChainId.BASE] = 6), _73),
21331
21339
  active: true,
21332
21340
  },
21333
21341
  {
21334
21342
  symbol: 'USDT',
21335
- address: ((_72 = {}), (_72[types_1.ChainId.BASE] = '0xfde4C96c8593536E31F229EA8f37b2ADa2699bb2'), _72),
21336
- decimals: ((_73 = {}), (_73[types_1.ChainId.BASE] = 6), _73),
21343
+ address: ((_74 = {}), (_74[types_1.ChainId.BASE] = '0xfde4C96c8593536E31F229EA8f37b2ADa2699bb2'), _74),
21344
+ decimals: ((_75 = {}), (_75[types_1.ChainId.BASE] = 6), _75),
21337
21345
  active: true,
21338
21346
  },
21339
21347
  {
21340
21348
  symbol: 'DAI',
21341
- address: ((_74 = {}), (_74[types_1.ChainId.BASE] = '0x50c5725949a6f0c72e6c4a641f24049a917db0cb'), _74),
21342
- decimals: ((_75 = {}), (_75[types_1.ChainId.BASE] = 18), _75),
21349
+ address: ((_76 = {}), (_76[types_1.ChainId.BASE] = '0x50c5725949a6f0c72e6c4a641f24049a917db0cb'), _76),
21350
+ decimals: ((_77 = {}), (_77[types_1.ChainId.BASE] = 18), _77),
21343
21351
  active: true,
21344
21352
  },
21345
21353
  {
21346
21354
  symbol: 'BTC',
21347
- address: ((_76 = {}), (_76[types_1.ChainId.BASE] = '0x0c41F1FC9022FEB69aF6dc666aBfE73C9FFDA7ce'), _76),
21348
- decimals: ((_77 = {}), (_77[types_1.ChainId.BASE] = 18), _77),
21355
+ address: ((_78 = {}), (_78[types_1.ChainId.BASE] = '0x0c41F1FC9022FEB69aF6dc666aBfE73C9FFDA7ce'), _78),
21356
+ decimals: ((_79 = {}), (_79[types_1.ChainId.BASE] = 18), _79),
21349
21357
  active: true,
21350
21358
  },
21351
21359
  ]),
21352
- (_3[types_1.ChainId.BLAST] = [
21360
+ (_5[types_1.ChainId.BLAST] = [
21353
21361
  {
21354
21362
  symbol: 'wETH',
21355
- address: ((_78 = {}), (_78[types_1.ChainId.BLAST] = '0x4300000000000000000000000000000000000004'), _78),
21356
- decimals: ((_79 = {}), (_79[types_1.ChainId.BLAST] = 18), _79),
21363
+ address: ((_80 = {}), (_80[types_1.ChainId.BLAST] = '0x4300000000000000000000000000000000000004'), _80),
21364
+ decimals: ((_81 = {}), (_81[types_1.ChainId.BLAST] = 18), _81),
21357
21365
  active: true,
21358
21366
  },
21359
21367
  {
21360
21368
  symbol: 'BTC',
21361
- address: ((_80 = {}), (_80[types_1.ChainId.BLAST] = '0xF7bc58b8D8f97ADC129cfC4c9f45Ce3C0E1D2692'), _80),
21362
- decimals: ((_81 = {}), (_81[types_1.ChainId.BLAST] = 18), _81),
21369
+ address: ((_82 = {}), (_82[types_1.ChainId.BLAST] = '0xF7bc58b8D8f97ADC129cfC4c9f45Ce3C0E1D2692'), _82),
21370
+ decimals: ((_83 = {}), (_83[types_1.ChainId.BLAST] = 18), _83),
21363
21371
  active: true,
21364
21372
  },
21365
21373
  {
21366
21374
  symbol: 'USDe',
21367
- address: ((_82 = {}), (_82[types_1.ChainId.BLAST] = '0x5d3a1ff2b6bab83b63cd9ad0787074081a52ef34'), _82),
21368
- decimals: ((_83 = {}), (_83[types_1.ChainId.BLAST] = 18), _83),
21375
+ address: ((_84 = {}), (_84[types_1.ChainId.BLAST] = '0x5d3a1ff2b6bab83b63cd9ad0787074081a52ef34'), _84),
21376
+ decimals: ((_85 = {}), (_85[types_1.ChainId.BLAST] = 18), _85),
21369
21377
  active: true,
21370
21378
  },
21371
21379
  ]),
21372
- (_3[types_1.ChainId.BERACHAIN] = [
21380
+ (_5[types_1.ChainId.BERACHAIN] = [
21373
21381
  {
21374
21382
  symbol: 'HONEY',
21375
- address: ((_84 = {}), (_84[types_1.ChainId.BERACHAIN] = '0xFCBD14DC51f0A4d49d5E53C2E0950e0bC26d0Dce'), _84),
21376
- decimals: ((_85 = {}), (_85[types_1.ChainId.BERACHAIN] = 18), _85),
21383
+ address: ((_86 = {}), (_86[types_1.ChainId.BERACHAIN] = '0xFCBD14DC51f0A4d49d5E53C2E0950e0bC26d0Dce'), _86),
21384
+ decimals: ((_87 = {}), (_87[types_1.ChainId.BERACHAIN] = 18), _87),
21377
21385
  active: true,
21378
21386
  },
21379
21387
  {
21380
21388
  symbol: 'BTC',
21381
- address: ((_86 = {}), (_86[types_1.ChainId.BERACHAIN] = '0x0555E30da8f98308EdB960aa94C0Db47230d2B9c'), _86),
21382
- decimals: ((_87 = {}), (_87[types_1.ChainId.BERACHAIN] = 8), _87),
21389
+ address: ((_88 = {}), (_88[types_1.ChainId.BERACHAIN] = '0x0555E30da8f98308EdB960aa94C0Db47230d2B9c'), _88),
21390
+ decimals: ((_89 = {}), (_89[types_1.ChainId.BERACHAIN] = 8), _89),
21383
21391
  active: true,
21384
21392
  },
21385
21393
  {
21386
21394
  symbol: 'USDe',
21387
- address: ((_88 = {}), (_88[types_1.ChainId.BERACHAIN] = '0x5d3a1ff2b6bab83b63cd9ad0787074081a52ef34'), _88),
21388
- decimals: ((_89 = {}), (_89[types_1.ChainId.BERACHAIN] = 18), _89),
21395
+ address: ((_90 = {}), (_90[types_1.ChainId.BERACHAIN] = '0x5d3a1ff2b6bab83b63cd9ad0787074081a52ef34'), _90),
21396
+ decimals: ((_91 = {}), (_91[types_1.ChainId.BERACHAIN] = 18), _91),
21389
21397
  active: true,
21390
21398
  },
21391
21399
  {
21392
21400
  symbol: 'WETH',
21393
- address: ((_90 = {}), (_90[types_1.ChainId.BERACHAIN] = '0x2F6F07CDcf3588944Bf4C42aC74ff24bF56e7590'), _90),
21394
- decimals: ((_91 = {}), (_91[types_1.ChainId.BERACHAIN] = 18), _91),
21401
+ address: ((_92 = {}), (_92[types_1.ChainId.BERACHAIN] = '0x2F6F07CDcf3588944Bf4C42aC74ff24bF56e7590'), _92),
21402
+ decimals: ((_93 = {}), (_93[types_1.ChainId.BERACHAIN] = 18), _93),
21395
21403
  active: true,
21396
21404
  },
21397
21405
  {
21398
21406
  symbol: 'USDC.e',
21399
- address: ((_92 = {}), (_92[types_1.ChainId.BERACHAIN] = '0x549943e04f40284185054145c6E4e9568C1D3241'), _92),
21400
- decimals: ((_93 = {}), (_93[types_1.ChainId.BERACHAIN] = 6), _93),
21407
+ address: ((_94 = {}), (_94[types_1.ChainId.BERACHAIN] = '0x549943e04f40284185054145c6E4e9568C1D3241'), _94),
21408
+ decimals: ((_95 = {}), (_95[types_1.ChainId.BERACHAIN] = 6), _95),
21401
21409
  active: true,
21402
21410
  },
21403
21411
  ]),
21404
- (_3[types_1.ChainId.SONIC] = [
21412
+ (_5[types_1.ChainId.SONIC] = [
21405
21413
  {
21406
21414
  symbol: 'wS',
21407
- address: ((_94 = {}), (_94[types_1.ChainId.SONIC] = '0x039e2fB66102314Ce7b64Ce5Ce3E5183bc94aD38'), _94),
21408
- decimals: ((_95 = {}), (_95[types_1.ChainId.SONIC] = 18), _95),
21415
+ address: ((_96 = {}), (_96[types_1.ChainId.SONIC] = '0x039e2fB66102314Ce7b64Ce5Ce3E5183bc94aD38'), _96),
21416
+ decimals: ((_97 = {}), (_97[types_1.ChainId.SONIC] = 18), _97),
21409
21417
  active: true,
21410
21418
  },
21411
21419
  {
21412
21420
  symbol: 'USDC',
21413
- address: ((_96 = {}), (_96[types_1.ChainId.SONIC] = '0x29219dd400f2Bf60E5a23d13Be72B486D4038894'), _96),
21414
- decimals: ((_97 = {}), (_97[types_1.ChainId.SONIC] = 6), _97),
21421
+ address: ((_98 = {}), (_98[types_1.ChainId.SONIC] = '0x29219dd400f2Bf60E5a23d13Be72B486D4038894'), _98),
21422
+ decimals: ((_99 = {}), (_99[types_1.ChainId.SONIC] = 6), _99),
21415
21423
  active: true,
21416
21424
  },
21417
21425
  {
21418
21426
  symbol: 'USDT',
21419
- address: ((_98 = {}), (_98[types_1.ChainId.SONIC] = '0x6047828dc181963ba44974801FF68e538dA5eaF9'), _98),
21420
- decimals: ((_99 = {}), (_99[types_1.ChainId.SONIC] = 6), _99),
21427
+ address: ((_100 = {}), (_100[types_1.ChainId.SONIC] = '0x6047828dc181963ba44974801FF68e538dA5eaF9'), _100),
21428
+ decimals: ((_101 = {}), (_101[types_1.ChainId.SONIC] = 6), _101),
21421
21429
  active: true,
21422
21430
  },
21423
21431
  {
21424
21432
  symbol: 'BTC',
21425
- address: ((_100 = {}), (_100[types_1.ChainId.SONIC] = '0x0555E30da8f98308EdB960aa94C0Db47230d2B9c'), _100),
21426
- decimals: ((_101 = {}), (_101[types_1.ChainId.SONIC] = 8), _101),
21433
+ address: ((_102 = {}), (_102[types_1.ChainId.SONIC] = '0x0555E30da8f98308EdB960aa94C0Db47230d2B9c'), _102),
21434
+ decimals: ((_103 = {}), (_103[types_1.ChainId.SONIC] = 8), _103),
21427
21435
  active: true,
21428
21436
  },
21429
21437
  {
21430
21438
  symbol: 'wETH',
21431
- address: ((_102 = {}), (_102[types_1.ChainId.SONIC] = '0x50c42dEAcD8Fc9773493ED674b675bE577f2634b'), _102),
21432
- decimals: ((_103 = {}), (_103[types_1.ChainId.SONIC] = 18), _103),
21439
+ address: ((_104 = {}), (_104[types_1.ChainId.SONIC] = '0x50c42dEAcD8Fc9773493ED674b675bE577f2634b'), _104),
21440
+ decimals: ((_105 = {}), (_105[types_1.ChainId.SONIC] = 18), _105),
21433
21441
  active: true,
21434
21442
  },
21435
21443
  ]),
21436
- (_3[types_1.ChainId.AVAX] = [
21444
+ (_5[types_1.ChainId.AVAX] = [
21437
21445
  {
21438
21446
  symbol: 'wAVAX',
21439
- address: ((_104 = {}), (_104[types_1.ChainId.AVAX] = '0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7'), _104),
21440
- decimals: ((_105 = {}), (_105[types_1.ChainId.AVAX] = 18), _105),
21447
+ address: ((_106 = {}), (_106[types_1.ChainId.AVAX] = '0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7'), _106),
21448
+ decimals: ((_107 = {}), (_107[types_1.ChainId.AVAX] = 18), _107),
21441
21449
  active: true,
21442
21450
  },
21443
21451
  {
21444
21452
  symbol: 'USDT',
21445
- address: ((_106 = {}), (_106[types_1.ChainId.AVAX] = '0x9702230A8Ea53601f5cD2dc00fDBc13d4dF4A8c7'), _106),
21446
- decimals: ((_107 = {}), (_107[types_1.ChainId.AVAX] = 6), _107),
21453
+ address: ((_108 = {}), (_108[types_1.ChainId.AVAX] = '0x9702230A8Ea53601f5cD2dc00fDBc13d4dF4A8c7'), _108),
21454
+ decimals: ((_109 = {}), (_109[types_1.ChainId.AVAX] = 6), _109),
21447
21455
  active: true,
21448
21456
  },
21449
21457
  {
21450
21458
  symbol: 'USDC',
21451
- address: ((_108 = {}), (_108[types_1.ChainId.AVAX] = '0xb97ef9ef8734c71904d8002f8b6bc66dd9c48a6e'), _108),
21452
- decimals: ((_109 = {}), (_109[types_1.ChainId.AVAX] = 6), _109),
21459
+ address: ((_110 = {}), (_110[types_1.ChainId.AVAX] = '0xb97ef9ef8734c71904d8002f8b6bc66dd9c48a6e'), _110),
21460
+ decimals: ((_111 = {}), (_111[types_1.ChainId.AVAX] = 6), _111),
21453
21461
  active: true,
21454
21462
  },
21455
21463
  {
21456
21464
  symbol: 'BTC',
21457
- address: ((_110 = {}), (_110[types_1.ChainId.AVAX] = '0x0555E30da8f98308EdB960aa94C0Db47230d2B9c'), _110),
21458
- decimals: ((_111 = {}), (_111[types_1.ChainId.AVAX] = 8), _111),
21465
+ address: ((_112 = {}), (_112[types_1.ChainId.AVAX] = '0x0555E30da8f98308EdB960aa94C0Db47230d2B9c'), _112),
21466
+ decimals: ((_113 = {}), (_113[types_1.ChainId.AVAX] = 8), _113),
21459
21467
  active: true,
21460
21468
  },
21461
21469
  {
21462
21470
  symbol: 'SUPER',
21463
- address: ((_112 = {}), (_112[types_1.ChainId.AVAX] = '0x09fa58228bb791ea355c90da1e4783452b9bd8c3'), _112),
21464
- decimals: ((_113 = {}), (_113[types_1.ChainId.AVAX] = 18), _113),
21471
+ address: ((_114 = {}), (_114[types_1.ChainId.AVAX] = '0x09fa58228bb791ea355c90da1e4783452b9bd8c3'), _114),
21472
+ decimals: ((_115 = {}), (_115[types_1.ChainId.AVAX] = 18), _115),
21465
21473
  active: true,
21466
21474
  },
21467
21475
  ]),
21468
- (_3[types_1.ChainId.SOL] = [
21476
+ (_5[types_1.ChainId.SOL] = [
21469
21477
  {
21470
21478
  symbol: 'wSOL',
21471
- address: ((_114 = {}), (_114[types_1.ChainId.SOL] = 'So11111111111111111111111111111111111111112'), _114),
21472
- decimals: ((_115 = {}), (_115[types_1.ChainId.SOL] = 9), _115),
21479
+ address: ((_116 = {}), (_116[types_1.ChainId.SOL] = 'So11111111111111111111111111111111111111112'), _116),
21480
+ decimals: ((_117 = {}), (_117[types_1.ChainId.SOL] = 9), _117),
21473
21481
  active: true,
21474
21482
  },
21475
21483
  {
21476
21484
  symbol: 'USDC',
21477
- address: ((_116 = {}), (_116[types_1.ChainId.SOL] = 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v'), _116),
21478
- decimals: ((_117 = {}), (_117[types_1.ChainId.SOL] = 6), _117),
21485
+ address: ((_118 = {}), (_118[types_1.ChainId.SOL] = 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v'), _118),
21486
+ decimals: ((_119 = {}), (_119[types_1.ChainId.SOL] = 6), _119),
21479
21487
  active: true,
21480
21488
  },
21481
21489
  {
21482
21490
  symbol: 'USDT',
21483
- address: ((_118 = {}), (_118[types_1.ChainId.SOL] = 'Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB'), _118),
21484
- decimals: ((_119 = {}), (_119[types_1.ChainId.SOL] = 6), _119),
21491
+ address: ((_120 = {}), (_120[types_1.ChainId.SOL] = 'Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB'), _120),
21492
+ decimals: ((_121 = {}), (_121[types_1.ChainId.SOL] = 6), _121),
21485
21493
  active: true,
21486
21494
  },
21487
21495
  {
21488
21496
  symbol: 'wETH',
21489
- address: ((_120 = {}), (_120[types_1.ChainId.SOL] = '7vfCXTUXx5WJV5JADk17DUJ4ksgau7utNKj4b963voxs'), _120),
21490
- decimals: ((_121 = {}), (_121[types_1.ChainId.SOL] = 8), _121),
21497
+ address: ((_122 = {}), (_122[types_1.ChainId.SOL] = '7vfCXTUXx5WJV5JADk17DUJ4ksgau7utNKj4b963voxs'), _122),
21498
+ decimals: ((_123 = {}), (_123[types_1.ChainId.SOL] = 8), _123),
21491
21499
  active: true,
21492
21500
  },
21493
21501
  ]),
21494
- _3);
21502
+ _5);
21495
21503
 
21496
21504
  return zapTokens;
21497
21505
  }
@@ -63538,7 +63546,7 @@ const getVestingTermsString = (bond) => {
63538
63546
  else if (vestingCliff) {
63539
63547
  const vestingTime = getTimePeriods(vestingTerm - vestingCliff, true);
63540
63548
  const vestingCliffString = getTimePeriods(vestingCliff, true);
63541
- return `${vestingCliffString.days} D + ${vestingTime.days} D`;
63549
+ return `${vestingCliffString.days + vestingTime.days} D`;
63542
63550
  }
63543
63551
  return '-';
63544
63552
  };
@@ -75707,6 +75715,22 @@ const Actions = ({ userBill }) => {
75707
75715
  : null, disabled: !canPurchaseAgain, children: canPurchaseAgain ? 'Buy again' : 'sold out' })] }));
75708
75716
  };
75709
75717
 
75718
+ /**
75719
+ * Checks if an Associated Token Account exists and returns creation instruction if needed
75720
+ * @returns Object with ATA address and optional creation instruction
75721
+ */
75722
+ const getAtaWithCreateInstruction = (connection_1, mint_1, owner_1, ...args_1) => __awaiter$9(void 0, [connection_1, mint_1, owner_1, ...args_1], void 0, function* (connection, mint, owner, payer = owner) {
75723
+ const ataAddress = yield getAssociatedTokenAddress(mint, owner);
75724
+ try {
75725
+ yield getAccount(connection, ataAddress);
75726
+ return { address: ataAddress, createInstruction: null };
75727
+ }
75728
+ catch (_a) {
75729
+ const createInstruction = createAssociatedTokenAccountInstruction(payer, ataAddress, owner, mint);
75730
+ return { address: ataAddress, createInstruction };
75731
+ }
75732
+ });
75733
+
75710
75734
  const ActionsSolana = ({ userBill }) => {
75711
75735
  var _a, _b;
75712
75736
  // Hooks
@@ -75731,36 +75755,6 @@ const ActionsSolana = ({ userBill }) => {
75731
75755
  const lastBlockTimestamp = parseInt((_b = userBill === null || userBill === void 0 ? void 0 : userBill.lastBlockTimestamp) !== null && _b !== void 0 ? _b : '0');
75732
75756
  const isPendingCliff = vestingCliff ? currentTime - lastBlockTimestamp < vestingCliff : false;
75733
75757
  const cliffCountdown = getTimePeriods(lastBlockTimestamp + (vestingCliff !== null && vestingCliff !== void 0 ? vestingCliff : 0) - currentTime, true);
75734
- // Handlers
75735
- const ensureUserPayoutAtaExists = (_a) => __awaiter$9(void 0, [_a], void 0, function* ({ connection, payer, payoutMint, user, }) {
75736
- const userPayoutAta = yield getAssociatedTokenAddress(payoutMint, user);
75737
- try {
75738
- yield getAccount(connection, userPayoutAta);
75739
- }
75740
- catch (_b) {
75741
- const ataIx = createAssociatedTokenAccountInstruction(payer, // fee payer
75742
- userPayoutAta, // ATA to create
75743
- user, // owner of ATA
75744
- payoutMint);
75745
- const tx = new Transaction().add(ataIx);
75746
- const latestBlockhash = yield connection.getLatestBlockhash('confirmed');
75747
- tx.recentBlockhash = latestBlockhash.blockhash;
75748
- tx.feePayer = payer;
75749
- if (!signTransaction)
75750
- return;
75751
- const signed = yield signTransaction(tx);
75752
- const txid = yield connection.sendRawTransaction(signed.serialize(), {
75753
- skipPreflight: false,
75754
- preflightCommitment: 'confirmed',
75755
- });
75756
- yield connection.confirmTransaction({
75757
- signature: txid,
75758
- blockhash: latestBlockhash.blockhash,
75759
- lastValidBlockHeight: latestBlockhash.lastValidBlockHeight,
75760
- }, 'confirmed');
75761
- }
75762
- return userPayoutAta;
75763
- });
75764
75758
  const handleClaim = () => __awaiter$9(void 0, void 0, void 0, function* () {
75765
75759
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
75766
75760
  // Early return guard - prevent double execution
@@ -75778,12 +75772,8 @@ const ActionsSolana = ({ userBill }) => {
75778
75772
  const nftMint = new PublicKey(userBill.asset);
75779
75773
  const [bondTermPda] = PublicKey.findProgramAddressSync([new TextEncoder().encode('bond_term'), bondIssuancePda.toBuffer()], PROGRAM_ID);
75780
75774
  const [bondPda] = PublicKey.findProgramAddressSync([new TextEncoder().encode('bond'), bondIssuancePda.toBuffer(), nftMint.toBuffer()], PROGRAM_ID);
75781
- const userPayoutAta = yield ensureUserPayoutAtaExists({
75782
- connection,
75783
- payer: accountSolana,
75784
- payoutMint,
75785
- user: accountSolana,
75786
- });
75775
+ // Get user payout ATA and creation instruction if needed
75776
+ const { address: userPayoutAta, createInstruction: createAtaIx } = yield getAtaWithCreateInstruction(connection, payoutMint, accountSolana);
75787
75777
  // treasury_ata = PDA
75788
75778
  const [treasuryAta] = PublicKey.findProgramAddressSync([bondIssuancePda.toBuffer(), COMMON_CONST_SEED, payoutMint.toBuffer()], COMMON_PDA_PROGRAM);
75789
75779
  // Build keys list
@@ -75801,14 +75791,17 @@ const ActionsSolana = ({ userBill }) => {
75801
75791
  { pubkey: new PublicKey('CoREENxT6tW1HoK8ypY1SxRMZTcVPm7R94rH4PZNhX7d'), isSigner: false, isWritable: false }, // mplCoreProgram
75802
75792
  { pubkey: PROGRAM_ID, isSigner: false, isWritable: false }, // passing programId is the same as passing null
75803
75793
  ];
75804
- // Build Instruction (no args → just discriminator)
75805
- const instruction = new TransactionInstruction({
75794
+ // Build Claim Instruction (no args → just discriminator)
75795
+ const claimInstruction = new TransactionInstruction({
75806
75796
  keys,
75807
75797
  programId: PROGRAM_ID,
75808
75798
  data: CLAIM_DISCRIMINATOR,
75809
75799
  });
75810
- // Build Transaction
75811
- const transaction = new Transaction().add(instruction);
75800
+ // Build Transaction - include ATA creation if needed
75801
+ const transaction = new Transaction();
75802
+ if (createAtaIx)
75803
+ transaction.add(createAtaIx);
75804
+ transaction.add(claimInstruction);
75812
75805
  transaction.feePayer = accountSolana;
75813
75806
  // Get fresh blockhash right before signing
75814
75807
  const { blockhash, lastValidBlockHeight } = yield connection.getLatestBlockhash('finalized');
@@ -75846,6 +75839,8 @@ const ActionsSolana = ({ userBill }) => {
75846
75839
  reportError({
75847
75840
  apiUrl: (_m = SDKConfig === null || SDKConfig === void 0 ? void 0 : SDKConfig.urls) === null || _m === void 0 ? void 0 : _m.apiV2,
75848
75841
  error,
75842
+ account: accountSolana === null || accountSolana === void 0 ? void 0 : accountSolana.toBase58(),
75843
+ chainId: main.ChainId.SOL,
75849
75844
  extraInfo: { type: 'claim', userBill, error },
75850
75845
  });
75851
75846
  }
@@ -75919,7 +75914,7 @@ const YourBondsModal = ({ userBill, onDismiss }) => {
75919
75914
  p: '4px 10px',
75920
75915
  background: 'white3',
75921
75916
  borderRadius: '10px 10px 0px 0px',
75922
- }, children: [jsxs(Flex, { sx: { alignItems: 'center', gap: '5px' }, children: [jsx$2(Flex, { sx: { opacity: 0.6 }, children: "Vesting Progress" }), jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(Flex, { children: UserBillTooltipText.FullyVested }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, 0%)", children: jsx$2(Flex, { className: "block-header icon", children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) })] }), jsx$2(Flex, { sx: { alignItems: 'center' }, children: isPendingCliff ? (jsxs(Fragment$1, { children: ["claimable in", ' ', `${cliffCountdown.days !== 0 ? `${cliffCountdown.days} days` : cliffCountdown.hours !== 0 ? `${cliffCountdown.hours} hours` : `${cliffCountdown.minutes} mins`}`] })) : (jsx$2(ProgressBarWrapper$1, { title: '', value: jsx$2(ProgressBar, { value: getPercentageVested(userBill) }), style: {
75917
+ }, children: [jsxs(Flex, { sx: { alignItems: 'center', gap: '5px' }, children: [jsx$2(Flex, { sx: { opacity: 0.6 }, children: "Vesting Progress" }), jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(Flex, { children: UserBillTooltipText.FullyVested }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, 0%)", children: jsx$2(Flex, { className: "block-header icon", children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) })] }), jsx$2(Flex, { sx: { alignItems: 'center' }, children: isPendingCliff ? (jsxs(Fragment$1, { children: ["Claiming starts in", ' ', `${cliffCountdown.days !== 0 ? `${cliffCountdown.days} days` : cliffCountdown.hours !== 0 ? `${cliffCountdown.hours} hours` : `${cliffCountdown.minutes} mins`}`] })) : (jsx$2(ProgressBarWrapper$1, { title: '', value: jsx$2(ProgressBar, { value: getPercentageVested(userBill) }), style: {
75923
75918
  width: '100px',
75924
75919
  flexDirection: 'column',
75925
75920
  alignItems: 'center',
@@ -76177,37 +76172,8 @@ const UserBondRowSolana = ({ bill }) => {
76177
76172
  const isPendingCliff = vestingCliff ? currentTime - vestingStartTimestamp < vestingCliff : false;
76178
76173
  const cliffCountdown = getTimePeriods(vestingStartTimestamp + (vestingCliff !== null && vestingCliff !== void 0 ? vestingCliff : 0) - currentTime, true);
76179
76174
  const [onOpenPurchasedBond] = useModal(jsx$2(YourBondsModal, { userBill: bill }));
76180
- const ensureUserPayoutAtaExists = (_a) => __awaiter$9(void 0, [_a], void 0, function* ({ connection, payer, payoutMint, user, }) {
76181
- const userPayoutAta = yield getAssociatedTokenAddress(payoutMint, user);
76182
- try {
76183
- yield getAccount(connection, userPayoutAta);
76184
- }
76185
- catch (_b) {
76186
- if (!signTransaction)
76187
- return;
76188
- const ataIx = createAssociatedTokenAccountInstruction(payer, // fee payer
76189
- userPayoutAta, // ATA to create
76190
- user, // owner of ATA
76191
- payoutMint);
76192
- const tx = new Transaction().add(ataIx);
76193
- const latestBlockhash = yield connection.getLatestBlockhash('confirmed');
76194
- tx.recentBlockhash = latestBlockhash.blockhash;
76195
- tx.feePayer = payer;
76196
- const signed = yield signTransaction(tx);
76197
- const txid = yield connection.sendRawTransaction(signed.serialize(), {
76198
- skipPreflight: false,
76199
- preflightCommitment: 'confirmed',
76200
- });
76201
- yield connection.confirmTransaction({
76202
- signature: txid,
76203
- blockhash: latestBlockhash.blockhash,
76204
- lastValidBlockHeight: latestBlockhash.lastValidBlockHeight,
76205
- }, 'confirmed');
76206
- }
76207
- return userPayoutAta;
76208
- });
76209
76175
  const handleClaim = () => __awaiter$9(void 0, void 0, void 0, function* () {
76210
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
76176
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
76211
76177
  // Early return guard - prevent double execution
76212
76178
  if (loadingTx || !accountSolana)
76213
76179
  return;
@@ -76223,12 +76189,8 @@ const UserBondRowSolana = ({ bill }) => {
76223
76189
  const nftMint = new PublicKey(bill.asset);
76224
76190
  const [bondTermPda] = PublicKey.findProgramAddressSync([new TextEncoder().encode('bond_term'), bondIssuancePda.toBuffer()], PROGRAM_ID);
76225
76191
  const [bondPda] = PublicKey.findProgramAddressSync([new TextEncoder().encode('bond'), bondIssuancePda.toBuffer(), nftMint.toBuffer()], PROGRAM_ID);
76226
- const userPayoutAta = yield ensureUserPayoutAtaExists({
76227
- connection,
76228
- payer: accountSolana,
76229
- payoutMint,
76230
- user: accountSolana,
76231
- });
76192
+ // Get user payout ATA and creation instruction if needed
76193
+ const { address: userPayoutAta, createInstruction: createAtaIx } = yield getAtaWithCreateInstruction(connection, payoutMint, accountSolana);
76232
76194
  // treasury_ata = PDA
76233
76195
  const [treasuryAta] = PublicKey.findProgramAddressSync([bondIssuancePda.toBuffer(), COMMON_CONST_SEED, payoutMint.toBuffer()], COMMON_PDA_PROGRAM);
76234
76196
  // Build keys list
@@ -76246,14 +76208,17 @@ const UserBondRowSolana = ({ bill }) => {
76246
76208
  { pubkey: new PublicKey('CoREENxT6tW1HoK8ypY1SxRMZTcVPm7R94rH4PZNhX7d'), isSigner: false, isWritable: false }, // mplCoreProgram
76247
76209
  { pubkey: PROGRAM_ID, isSigner: false, isWritable: false }, // passing programId is the same as passing null
76248
76210
  ];
76249
- // Build Instruction (no args → just discriminator)
76250
- const instruction = new TransactionInstruction({
76211
+ // Build Claim Instruction (no args → just discriminator)
76212
+ const claimInstruction = new TransactionInstruction({
76251
76213
  keys,
76252
76214
  programId: PROGRAM_ID,
76253
76215
  data: CLAIM_DISCRIMINATOR,
76254
76216
  });
76255
- // Build Transaction
76256
- const transaction = new Transaction().add(instruction);
76217
+ // Build Transaction - include ATA creation if needed
76218
+ const transaction = new Transaction();
76219
+ if (createAtaIx)
76220
+ transaction.add(createAtaIx);
76221
+ transaction.add(claimInstruction);
76257
76222
  transaction.feePayer = accountSolana;
76258
76223
  // Get fresh blockhash right before signing
76259
76224
  const { blockhash, lastValidBlockHeight } = yield connection.getLatestBlockhash('finalized');
@@ -76291,6 +76256,8 @@ const UserBondRowSolana = ({ bill }) => {
76291
76256
  reportError({
76292
76257
  apiUrl: (_m = SDKConfig === null || SDKConfig === void 0 ? void 0 : SDKConfig.urls) === null || _m === void 0 ? void 0 : _m.apiV2,
76293
76258
  error,
76259
+ chainId: main.ChainId.SOL,
76260
+ account: (_o = accountSolana === null || accountSolana === void 0 ? void 0 : accountSolana.toBase58()) !== null && _o !== void 0 ? _o : '',
76294
76261
  extraInfo: { type: 'claim', bill, error },
76295
76262
  });
76296
76263
  }
@@ -76585,15 +76552,6 @@ const YourBonds = ({ showOnly }) => {
76585
76552
  const { data: chainFilterOption, setChainFilterOption } = useChainFilterOption();
76586
76553
  const { data: preTGEUserBonds, isFetched: preTGEFetched } = useUserBondsPreTGE();
76587
76554
  const hasFetched = userBondsFetched && (preTGEFetched || !account);
76588
- const preTGEBondsToRender = preTGEUserBonds === null || preTGEUserBonds === void 0 ? void 0 : preTGEUserBonds.filter((userBond) => {
76589
- var _a, _b, _c, _d;
76590
- if (!((_a = userBond === null || userBond === void 0 ? void 0 : userBond.accountInfo) === null || _a === void 0 ? void 0 : _a.hasRedeemed)) {
76591
- return parseFloat((_c = (_b = userBond === null || userBond === void 0 ? void 0 : userBond.accountInfo) === null || _b === void 0 ? void 0 : _b.depositAmount) !== null && _c !== void 0 ? _c : '0') > 0;
76592
- }
76593
- else {
76594
- return ((_d = userBond === null || userBond === void 0 ? void 0 : userBond.userOwnedBillsData) === null || _d === void 0 ? void 0 : _d.payout) !== '0';
76595
- }
76596
- });
76597
76555
  // State
76598
76556
  const [sortConfig, setSortConfig] = useState({
76599
76557
  key: 'claimable',
@@ -76602,6 +76560,15 @@ const YourBonds = ({ showOnly }) => {
76602
76560
  const [inputValue, setInputValue] = useState('');
76603
76561
  const filterOptions = ['CLAIMABLE', 'ALL'];
76604
76562
  const [filterOption, setFilterOption] = useState(filterOptions[0]);
76563
+ const preTGEBondsToRender = preTGEUserBonds === null || preTGEUserBonds === void 0 ? void 0 : preTGEUserBonds.filter((userBond) => {
76564
+ var _a, _b, _c, _d;
76565
+ if (!((_a = userBond === null || userBond === void 0 ? void 0 : userBond.accountInfo) === null || _a === void 0 ? void 0 : _a.hasRedeemed)) {
76566
+ return parseFloat((_c = (_b = userBond === null || userBond === void 0 ? void 0 : userBond.accountInfo) === null || _b === void 0 ? void 0 : _b.depositAmount) !== null && _c !== void 0 ? _c : '0') > 0;
76567
+ }
76568
+ else {
76569
+ return ((_d = userBond === null || userBond === void 0 ? void 0 : userBond.userOwnedBillsData) === null || _d === void 0 ? void 0 : _d.payout) !== '0';
76570
+ }
76571
+ }).filter((userBond) => { var _a, _b; return chainFilterOption.includes((_b = (_a = userBond.chainId) === null || _a === void 0 ? void 0 : _a.toString()) !== null && _b !== void 0 ? _b : '') || chainFilterOption.includes('All Chains'); }).filter((userBond) => { var _a; return (_a = userBond.earnToken.symbol) === null || _a === void 0 ? void 0 : _a.toLowerCase().includes(inputValue.toLowerCase()); });
76605
76572
  const handleSort = (key) => {
76606
76573
  let direction = 'desc';
76607
76574
  if ((sortConfig === null || sortConfig === void 0 ? void 0 : sortConfig.key) === key && (sortConfig === null || sortConfig === void 0 ? void 0 : sortConfig.direction) === 'desc') {
@@ -76708,7 +76675,7 @@ const YourBonds = ({ showOnly }) => {
76708
76675
  if (((_a = bond.bond) === null || _a === void 0 ? void 0 : _a.chainId) === main.ChainId.SOL)
76709
76676
  return jsx$2(UserBondRowSolana, { bill: bond }, `${bond === null || bond === void 0 ? void 0 : bond.billNftAddress}-${bond.id}`);
76710
76677
  return jsx$2(UserBondRow, { bill: bond }, `${bond === null || bond === void 0 ? void 0 : bond.id}-${bond === null || bond === void 0 ? void 0 : bond.billNftAddress}`);
76711
- })] })) : inputValue !== '' || !chainFilterOption.includes('All Chains') ? (jsx$2(PlaceholderMonkey, { text: 'No results, change filters.' })) : hasFetched && !hasBonds ? (jsx$2(Flex$1, { className: "placeholder-monkey-wrapper", children: jsx$2(PlaceholderMonkey, { text: `You do not own any ${account && solanaAccount ? 'EVM nor SOL' : account ? 'EVM' : 'SOL'} Bonds.` }) })) : (jsx$2(Flex$1, { className: "placeholder-monkey-wrapper", children: jsx$2(Spinner, { size: 100 }) })), jsxs(Flex$1, { sx: { width: '100%', flexDirection: ['column', 'column', 'column', 'row'], gap: '10px', my: '10px' }, children: [!solanaAccount && (jsx$2(Flex$1, { sx: { width: '100%', mt: '5px' }, children: jsx$2(ConnectToSolanaCard, {}) })), !account && (jsx$2(Flex$1, { sx: { width: '100%', mt: '5px' }, children: jsx$2(ConnectToEVMBanner, {}) }))] })] }));
76678
+ })] })) : inputValue !== '' || !chainFilterOption.includes('All Chains') ? (jsx$2(Flex$1, { className: "placeholder-monkey-wrapper", children: jsx$2(PlaceholderMonkey, { text: 'No results, change filters.' }) })) : hasFetched && !hasBonds ? (jsx$2(Flex$1, { className: "placeholder-monkey-wrapper", children: jsx$2(PlaceholderMonkey, { text: `You do not own any ${account && solanaAccount ? 'EVM nor SOL' : account ? 'EVM' : 'SOL'} Bonds.` }) })) : (jsx$2(Flex$1, { className: "placeholder-monkey-wrapper", children: jsx$2(Spinner, { size: 100 }) })), jsxs(Flex$1, { sx: { width: '100%', flexDirection: ['column', 'column', 'column', 'row'], gap: '10px', my: '10px' }, children: [!solanaAccount && (jsx$2(Flex$1, { sx: { width: '100%', mt: '5px' }, children: jsx$2(ConnectToSolanaCard, {}) })), !account && (jsx$2(Flex$1, { sx: { width: '100%', mt: '5px' }, children: jsx$2(ConnectToEVMBanner, {}) }))] })] }));
76712
76679
  };
76713
76680
 
76714
76681
  // This basically returns the 2 tags with the higher active bond count
@@ -76873,7 +76840,7 @@ const TokenRow = ({ token, chainId, handleTokenSelect, tokenBalance, }) => {
76873
76840
  const tokenAddress = token === 'NATIVE' ? 'NATIVE' : token.address[chainId];
76874
76841
  const { address } = useEVMAccount();
76875
76842
  const { publicKey: accountSolana } = useSOLAccount();
76876
- const accountToUse = chainId === main.ChainId.SOL ? accountSolana.toString() : address;
76843
+ const accountToUse = chainId === main.ChainId.SOL ? accountSolana === null || accountSolana === void 0 ? void 0 : accountSolana.toString() : address;
76877
76844
  const splited = typeof token !== 'string' ? (_a = token === null || token === void 0 ? void 0 : token.symbol) === null || _a === void 0 ? void 0 : _a.split('-') : undefined;
76878
76845
  return (jsxs(Flex, { sx: { p: '8px', justifyContent: 'space-between', cursor: 'pointer', '&:hover': { background: 'white4' } }, onClick: () => handleTokenSelect(tokenAddress !== null && tokenAddress !== void 0 ? tokenAddress : ''), children: [jsxs(Flex, { children: [lodashExports.isArray(splited) ? (jsx$2(TokenImage, { symbol: splited[0], symbol2: splited[1], size: 28, chain: chainId })) : (jsx$2(TokenImage, { symbol: getSymbol(token, chainId), size: 28, chain: chainId })), jsx$2(Flex, { sx: { mx: '8px', lineHeight: '28px', fontSize: '14px' }, children: symbol })] }), accountToUse && (jsx$2(Flex, { sx: { fontSize: '14px' }, children: tokenBalance === '0' ? ('0') : !tokenBalance ? (jsx$2(Spinner, { size: 15 })) : (jsx$2(Fragment$1, { children: (_b = new BigNumber$1(tokenBalance !== null && tokenBalance !== void 0 ? tokenBalance : '0')) === null || _b === void 0 ? void 0 : _b.toPrecision(5) })) }))] }));
76879
76846
  };
@@ -76921,7 +76888,7 @@ function useUserTokensBalance(tokens, chainId) {
76921
76888
  const keys = tokens.map((token) => (token === 'NATIVE' ? 'NATIVE' : token.address[chainId]));
76922
76889
  const { address: account } = useEVMAccount();
76923
76890
  const { publicKey: accountSolana } = useSOLAccount();
76924
- const accountToUse = chainId === main.ChainId.SOL ? accountSolana.toString() : account;
76891
+ const accountToUse = chainId === main.ChainId.SOL ? accountSolana === null || accountSolana === void 0 ? void 0 : accountSolana.toString() : account;
76925
76892
  const apiUrl = useURLByEnvironment('apiV2');
76926
76893
  return useQuery({
76927
76894
  queryKey: [`${QUERY_KEYS.USER_TOKENS_BALANCES}-${keys}-${accountToUse}`],
@@ -77055,10 +77022,6 @@ const TokenSelectorModal = ({ bondPrincipalToken, handleCurrencySelect, chainId,
77055
77022
  const sortedZapList = useSortedZapList(chainId, bondPrincipalToken);
77056
77023
  const parsedList = (_a = sortedZapList === null || sortedZapList === void 0 ? void 0 : sortedZapList.filter((token) => {
77057
77024
  var _a;
77058
- // Filter out native SOL for Solana chain
77059
- if (chainId === main.ChainId.SOL && token.token === 'NATIVE') {
77060
- return false;
77061
- }
77062
77025
  // Search filter
77063
77026
  return !searchQuery
77064
77027
  ? true
@@ -78981,7 +78944,7 @@ const BondCards = ({ bondData }) => {
78981
78944
  };
78982
78945
 
78983
78946
  const Estimations = ({ depositAmount, bondData, youSpendString, isZap, fetchingZapQuote, zapError, }) => {
78984
- var _a, _b, _c, _d, _e;
78947
+ var _a, _b, _c, _d;
78985
78948
  const { data: userPoints } = useTierPoints();
78986
78949
  const trueBondPrice = findHighestTrueBondPrice(userPoints, bondData === null || bondData === void 0 ? void 0 : bondData.trueBondPrices);
78987
78950
  const SDKConfig = useSDKConfig();
@@ -79011,7 +78974,7 @@ const Estimations = ({ depositAmount, bondData, youSpendString, isZap, fetchingZ
79011
78974
  background: 'primaryButton',
79012
78975
  opacity: 0.3,
79013
78976
  borderRadius: 'normal',
79014
- } }), jsxs(Flex, { className: "row-container premium", sx: { zIndex: 1 }, children: [jsx$2("img", { src: `https://ape.bond/images/launch/${tierName === null || tierName === void 0 ? void 0 : tierName.toLowerCase()}.png`, alt: "minTier", style: { width: '21px', height: '21px', marginRight: '3px', zIndex: 1 } }), jsx$2(Flex, { sx: { color: 'success', mr: '3px', fontWeight: 700 }, children: `${(_c = trueBondPrice === null || trueBondPrice === void 0 ? void 0 : trueBondPrice.boost) !== null && _c !== void 0 ? _c : 0}%` }), "Boost:", jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(Flex, { children: TooltipText.Boost }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, 0%)", children: jsx$2(Flex, { className: "row-container premium-icon", children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) })] }), isZap && fetchingZapQuote ? (jsx$2(Dots, {})) : isZap && zapError ? ('-') : (jsxs(Flex, { className: `row-container premium-val premium-positive`, children: ["$ ", formatNumberSI(boostAmount)] }))] })), !!bondData.feeInPayout && (jsxs(Flex, { className: "text-container row", children: [jsxs(Flex, { className: "row-container premium", children: ["Fee:", jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsxs(Flex, { children: ["This is the protocol fee (", bondData.feeInPayout, "%)."] }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, -5%)", children: jsx$2(Flex, { className: "row-container premium-icon", children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) })] }), isZap && fetchingZapQuote ? (jsx$2(Dots, {})) : isZap && zapError ? ('-') : (jsxs(Flex, { className: `row-container premium-val`, children: ["$ ", formatNumberSI(feeUSD)] }))] })), jsxs(Flex, { className: "text-container row", children: [jsxs(Flex, { className: "row-container get", children: ["You Get (over ", vestingTime(((_d = bondData === null || bondData === void 0 ? void 0 : bondData.vestingTerm) !== null && _d !== void 0 ? _d : 0) - ((_e = bondData.vestingCliff) !== null && _e !== void 0 ? _e : 0)).days, " days):"] }), isZap && fetchingZapQuote ? (jsx$2(Dots, {})) : isZap && zapError ? ('-') : (jsxs(Flex, { className: "row-container get-val", children: [formatNumberSI(estimatedOutputAmount, 4), " ", bondData === null || bondData === void 0 ? void 0 : bondData.showcaseTokenName, " = $", ' ', formatNumberSI(estimatedOutputUSD)] }))] })] }));
78977
+ } }), jsxs(Flex, { className: "row-container premium", sx: { zIndex: 1 }, children: [jsx$2("img", { src: `https://ape.bond/images/launch/${tierName === null || tierName === void 0 ? void 0 : tierName.toLowerCase()}.png`, alt: "minTier", style: { width: '21px', height: '21px', marginRight: '3px', zIndex: 1 } }), jsx$2(Flex, { sx: { color: 'success', mr: '3px', fontWeight: 700 }, children: `${(_c = trueBondPrice === null || trueBondPrice === void 0 ? void 0 : trueBondPrice.boost) !== null && _c !== void 0 ? _c : 0}%` }), "Boost:", jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(Flex, { children: TooltipText.Boost }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, 0%)", children: jsx$2(Flex, { className: "row-container premium-icon", children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) })] }), isZap && fetchingZapQuote ? (jsx$2(Dots, {})) : isZap && zapError ? ('-') : (jsxs(Flex, { className: `row-container premium-val premium-positive`, children: ["$ ", formatNumberSI(boostAmount)] }))] })), !!bondData.feeInPayout && (jsxs(Flex, { className: "text-container row", children: [jsxs(Flex, { className: "row-container premium", children: ["Fee:", jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsxs(Flex, { children: ["This is the protocol fee (", bondData.feeInPayout, "%)."] }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, -5%)", children: jsx$2(Flex, { className: "row-container premium-icon", children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) })] }), isZap && fetchingZapQuote ? (jsx$2(Dots, {})) : isZap && zapError ? ('-') : (jsxs(Flex, { className: `row-container premium-val`, children: ["$ ", formatNumberSI(feeUSD)] }))] })), jsxs(Flex, { className: "text-container row", children: [jsxs(Flex, { className: "row-container get", children: ["You Get (over ", vestingTime((_d = bondData === null || bondData === void 0 ? void 0 : bondData.vestingTerm) !== null && _d !== void 0 ? _d : 0).days, " days):"] }), isZap && fetchingZapQuote ? (jsx$2(Dots, {})) : isZap && zapError ? ('-') : (jsxs(Flex, { className: "row-container get-val", children: [formatNumberSI(estimatedOutputAmount, 4), " ", bondData === null || bondData === void 0 ? void 0 : bondData.showcaseTokenName, " = $", ' ', formatNumberSI(estimatedOutputUSD)] }))] })] }));
79015
78978
  };
79016
78979
 
79017
78980
  const ProjectDescription = ({ description, isProjectView }) => {
@@ -79620,7 +79583,6 @@ const BuyComponent = ({ onDismiss, bondAddress, bondChain, handlePurchasedBond,
79620
79583
  const [openNoBonusModal] = useModal(jsx$2(NoBonusModal, { onAcknowledge: openTxModal, showcaseTokenName: bondData === null || bondData === void 0 ? void 0 : bondData.showcaseTokenName }), true, true, 'NoBonusModal');
79621
79584
  // Effects
79622
79585
  const [hasChecked, setHasChecked] = useState(false);
79623
- const [hasCheckedTrack, setHasCheckedTrack] = useState(false);
79624
79586
  useEffect(() => {
79625
79587
  if (inputCurrencyBalance !== undefined &&
79626
79588
  inputCurrencyBalance === '0' &&
@@ -79632,9 +79594,6 @@ const BuyComponent = ({ onDismiss, bondAddress, bondChain, handlePurchasedBond,
79632
79594
  setHasChecked(true);
79633
79595
  setInputTokenString(sortedZapList[0].token === 'NATIVE' ? 'NATIVE' : sortedZapList[0].token.address[bondChain]);
79634
79596
  }
79635
- if (bondData && !hasCheckedTrack) {
79636
- setHasCheckedTrack(true);
79637
- }
79638
79597
  /* eslint-disable react-hooks/exhaustive-deps */
79639
79598
  }, [inputCurrencyBalance, sortedZapList, bondData]);
79640
79599
  // If rateChanged meaning the zap quote has a >1% difference from the true bond price, we let the user know and we update state
@@ -80486,6 +80445,7 @@ slippage = 0.5) => {
80486
80445
  : inputCurrency === null || inputCurrency === void 0 ? void 0 : inputCurrency.address[chainId];
80487
80446
  const principalTokenAddress = principalToken === null || principalToken === void 0 ? void 0 : principalToken.address[chainId];
80488
80447
  const inputCurrencyDecimals = inputCurrency === 'NATIVE' ? 9 : inputCurrency === null || inputCurrency === void 0 ? void 0 : inputCurrency.decimals[chainId];
80448
+ const wrapAndUnwrapSol = inputCurrency === 'NATIVE'; // true for native SOL, false for wSOL token
80489
80449
  // Calculate amount in smallest unit (lamports for SOL, or token's base unit)
80490
80450
  const validated18DecimalAmount = new BigNumber$1(debouncedInput !== null && debouncedInput !== void 0 ? debouncedInput : '0').toFixed(18, 5);
80491
80451
  const amountInSmallestUnit = new BigNumber$1(validated18DecimalAmount !== null && validated18DecimalAmount !== void 0 ? validated18DecimalAmount : '0')
@@ -80510,8 +80470,9 @@ slippage = 0.5) => {
80510
80470
  asLegacyTransaction: false,
80511
80471
  dexes: ['Raydium'],
80512
80472
  maxAccounts: 24,
80473
+ useWsol: inputCurrency !== 'NATIVE',
80513
80474
  };
80514
- }, [inputTokenAddress, principalTokenAddress, amountInSmallestUnit, account, slippage]);
80475
+ }, [inputTokenAddress, principalTokenAddress, amountInSmallestUnit, account, slippage, inputCurrency]);
80515
80476
  // Fallback params with multi-hop routing
80516
80477
  const multiHopQueryParams = useMemo(() => {
80517
80478
  if (!directQueryParams)
@@ -80526,7 +80487,7 @@ slippage = 0.5) => {
80526
80487
  if (preferDirectRoutes) {
80527
80488
  try {
80528
80489
  console.log('Trying direct route on Jupiter');
80529
- console.log(slippage);
80490
+ console.log(directQueryParams);
80530
80491
  const directQuote = yield jupiterQuoteApi.quoteGet(directQueryParams);
80531
80492
  if (directQuote) {
80532
80493
  console.log('Got direct route quote from Jupiter');
@@ -80576,7 +80537,15 @@ slippage = 0.5) => {
80576
80537
  .toString()
80577
80538
  : '0';
80578
80539
  const zapLoading = isLoading || isFetching;
80579
- return [zapLoading, quoteData !== null && quoteData !== void 0 ? quoteData : null, estimatedDepositAmount, zapError, isDirect, minimumDepositAmount];
80540
+ return [
80541
+ zapLoading,
80542
+ quoteData !== null && quoteData !== void 0 ? quoteData : null,
80543
+ estimatedDepositAmount,
80544
+ zapError,
80545
+ isDirect,
80546
+ minimumDepositAmount,
80547
+ wrapAndUnwrapSol,
80548
+ ];
80580
80549
  };
80581
80550
 
80582
80551
  const ConnectSolanaWallet = ({ navBarFlag }) => {
@@ -80618,7 +80587,7 @@ const BuyComponentSolana = ({ onDismiss, bondAddress, bondChain, isProjectView,
80618
80587
  const inputTokenPrice = useCurrencyPrice(inputToken !== null && inputToken !== void 0 ? inputToken : null, bondChain);
80619
80588
  const { data: inputCurrencyBalance } = useCurrencyBalanceSolana(inputToken !== null && inputToken !== void 0 ? inputToken : null, (_c = accountSolana === null || accountSolana === void 0 ? void 0 : accountSolana.toBase58()) !== null && _c !== void 0 ? _c : null);
80620
80589
  const isZap = (inputTokenString === null || inputTokenString === void 0 ? void 0 : inputTokenString.toLowerCase()) !== ((_f = (_e = (_d = bondData === null || bondData === void 0 ? void 0 : bondData.lpToken) === null || _d === void 0 ? void 0 : _d.address) === null || _e === void 0 ? void 0 : _e[bondData === null || bondData === void 0 ? void 0 : bondData.chainId]) === null || _f === void 0 ? void 0 : _f.toLowerCase());
80621
- const [fetchingZapQuote, jupiterQuote, zapDepositAmount, zapError, isDirectRoute, minimumDepositAmount] = useJupiterSolanaQuote(inputValue, inputToken, bondData, accountSolana === null || accountSolana === void 0 ? void 0 : accountSolana.toBase58(), true, slippage);
80590
+ const [fetchingZapQuote, jupiterQuote, zapDepositAmount, zapError, isDirectRoute, minimumDepositAmount, wrapAndUnwrapSol,] = useJupiterSolanaQuote(inputValue, inputToken, bondData, accountSolana === null || accountSolana === void 0 ? void 0 : accountSolana.toBase58(), true, slippage);
80622
80591
  const sortedZapList = useSortedZapList(bondChain, bondData === null || bondData === void 0 ? void 0 : bondData.lpToken);
80623
80592
  const enrichedTokenData = sortedZapList.find((item) => {
80624
80593
  var _a, _b, _c, _d, _e;
@@ -80631,7 +80600,6 @@ const BuyComponentSolana = ({ onDismiss, bondAddress, bondChain, isProjectView,
80631
80600
  const inputTokenPriceFromList = enrichedTokenData === null || enrichedTokenData === void 0 ? void 0 : enrichedTokenData.price;
80632
80601
  // Use the sorted list balance/price if available, otherwise fall back to existing
80633
80602
  const finalInputCurrencyBalance = inputCurrencyBalanceFromList !== null && inputCurrencyBalanceFromList !== void 0 ? inputCurrencyBalanceFromList : inputCurrencyBalance;
80634
- console.log(finalInputCurrencyBalance);
80635
80603
  const finalInputTokenPrice = inputTokenPriceFromList !== null && inputTokenPriceFromList !== void 0 ? inputTokenPriceFromList : inputTokenPrice === null || inputTokenPrice === void 0 ? void 0 : inputTokenPrice.price;
80636
80604
  // Estimations - use zapDepositAmount if swapping
80637
80605
  const depositAmount = isZap ? zapDepositAmount : inputValue;
@@ -80639,8 +80607,7 @@ const BuyComponentSolana = ({ onDismiss, bondAddress, bondChain, isProjectView,
80639
80607
  $${formatUSDNumber((parseFloat(inputValue) * (finalInputTokenPrice !== null && finalInputTokenPrice !== void 0 ? finalInputTokenPrice : 0)).toString())}`;
80640
80608
  // Validations - update to use finalInputCurrencyBalance
80641
80609
  const exceedsMaxBuy = maxBuy(bondData).lt(getPayoutAmount(bondData, depositAmount, '0'));
80642
- // const exceedsBalance = new BigNumber(finalInputCurrencyBalance ?? '0').lt(inputValue)
80643
- const exceedsBalance = false; // TODO: rollback this
80610
+ const exceedsBalance = new BigNumber$1(finalInputCurrencyBalance !== null && finalInputCurrencyBalance !== void 0 ? finalInputCurrencyBalance : '0').lt(inputValue);
80644
80611
  // Loading State - include zap loading
80645
80612
  const [loadingTx, setLoadingTx] = useState(false);
80646
80613
  const load = loadingTx || (fetchingZapQuote && !!inputValue);
@@ -80938,6 +80905,7 @@ const BuyComponentSolana = ({ onDismiss, bondAddress, bondChain, isProjectView,
80938
80905
  swapRequest: {
80939
80906
  quoteResponse: jupiterQuote,
80940
80907
  userPublicKey: accountSolana.toBase58(),
80908
+ wrapAndUnwrapSol: wrapAndUnwrapSol,
80941
80909
  dynamicComputeUnitLimit: true,
80942
80910
  prioritizationFeeLamports: {
80943
80911
  priorityLevelWithMaxLamports: {
@@ -81091,22 +81059,21 @@ const BuyComponentSolana = ({ onDismiss, bondAddress, bondChain, isProjectView,
81091
81059
  };
81092
81060
  const [openNoBonusModal] = useModal(jsx$2(NoBonusModal, { onAcknowledge: handleBothPurchases, showcaseTokenName: bondData === null || bondData === void 0 ? void 0 : bondData.showcaseTokenName }), true, true, 'NoBonusModal');
81093
81061
  // Effects
81094
- // const [hasChecked, setHasChecked] = useState(false)
81095
- // useEffect(() => {
81096
- // if (
81097
- // inputCurrencyBalance !== 'undefined' &&
81098
- // inputCurrencyBalance === '0' &&
81099
- // inputTokenString?.toLowerCase() === bondData?.lpToken?.address?.[bondData?.chainId]?.toLowerCase() &&
81100
- // !hasChecked &&
81101
- // bondChain &&
81102
- // supportedByLIFI.includes(bondChain)
81103
- // ) {
81104
- // setHasChecked(true)
81105
- // setInputTokenString('NATIVE')
81106
- // }
81107
- // /* eslint-disable react-hooks/exhaustive-deps */
81108
- // }, [inputCurrencyBalance])
81109
- return bondData ? (jsx$2(Flex, { className: "modal-content", sx: Object.assign({}, buyComponentStyles[(_g = bondData === null || bondData === void 0 ? void 0 : bondData.billArt) === null || _g === void 0 ? void 0 : _g.collection]), children: jsxs(Flex, { className: "modaltable-container", children: [jsx$2(BondModalHeader, { bondData: bondData, onDismiss: onDismiss }), jsx$2(ProjectDescription, { description: bondData.shortDescription, isProjectView: true }), jsx$2(Flex, { sx: { width: '100%', display: isProjectView ? ['flex', 'flex', 'flex', 'none'] : 'flex' }, children: jsx$2(BondCards, { bondData: bondData }) }), jsx$2(Estimations, { depositAmount: depositAmount, bondData: bondData, youSpendString: youSpendString, isZap: isZap, fetchingZapQuote: fetchingZapQuote, zapError: zapError }), jsx$2(TokenSelectorPanel, { typedValue: inputValue, setTypedValue: setInputValue, selectedToken: inputToken, handleValueBtn: () => { var _a; return setInputValue((_a = new BigNumber$1(inputCurrencyBalance !== null && inputCurrencyBalance !== void 0 ? inputCurrencyBalance : '0')) === null || _a === void 0 ? void 0 : _a.toString()); }, handleCurrencySelect: handleCurrencySelect, bondChainId: bondData === null || bondData === void 0 ? void 0 : bondData.chainId, enableZap: supportedByLIFI.includes(bondData === null || bondData === void 0 ? void 0 : bondData.chainId), bondPrincipalToken: bondData === null || bondData === void 0 ? void 0 : bondData.lpToken, tokenBalance: inputCurrencyBalance !== null && inputCurrencyBalance !== void 0 ? inputCurrencyBalance : undefined, selectedTokenPrice: inputTokenPrice === null || inputTokenPrice === void 0 ? void 0 : inputTokenPrice.price, inputDisabled: false }), (bondData === null || bondData === void 0 ? void 0 : bondData.warningCard) && (jsx$2(Flex, { sx: {
81062
+ const [hasChecked, setHasChecked] = useState(false);
81063
+ useEffect(() => {
81064
+ if (inputCurrencyBalance !== undefined &&
81065
+ parseFloat(inputCurrencyBalance !== null && inputCurrencyBalance !== void 0 ? inputCurrencyBalance : '0') < 0.0001 &&
81066
+ !hasChecked &&
81067
+ bondChain &&
81068
+ supportedByLIFI.includes(bondChain) &&
81069
+ (sortedZapList === null || sortedZapList === void 0 ? void 0 : sortedZapList.length) > 0 &&
81070
+ sortedZapList[0].usdValue !== 0) {
81071
+ setHasChecked(true);
81072
+ setInputTokenString(sortedZapList[0].token === 'NATIVE' ? 'NATIVE' : sortedZapList[0].token.address[bondChain]);
81073
+ }
81074
+ /* eslint-disable react-hooks/exhaustive-deps */
81075
+ }, [inputCurrencyBalance, sortedZapList, bondData]);
81076
+ return bondData ? (jsx$2(Flex, { className: "modal-content", sx: Object.assign({}, buyComponentStyles[(_g = bondData === null || bondData === void 0 ? void 0 : bondData.billArt) === null || _g === void 0 ? void 0 : _g.collection]), children: jsxs(Flex, { className: "modaltable-container", children: [jsx$2(BondModalHeader, { bondData: bondData, onDismiss: onDismiss }), jsx$2(ProjectDescription, { description: bondData.shortDescription, isProjectView: true }), jsx$2(Flex, { sx: { width: '100%', display: isProjectView ? ['flex', 'flex', 'flex', 'none'] : 'flex' }, children: jsx$2(BondCards, { bondData: bondData }) }), jsx$2(Estimations, { depositAmount: depositAmount, bondData: bondData, youSpendString: youSpendString, isZap: isZap, fetchingZapQuote: fetchingZapQuote, zapError: zapError }), jsx$2(TokenSelectorPanel, { typedValue: inputValue, setTypedValue: setInputValue, selectedToken: inputToken, handleValueBtn: () => { var _a; return setInputValue((_a = new BigNumber$1(inputCurrencyBalance !== null && inputCurrencyBalance !== void 0 ? inputCurrencyBalance : '0')) === null || _a === void 0 ? void 0 : _a.toString()); }, handleCurrencySelect: handleCurrencySelect, bondChainId: bondData === null || bondData === void 0 ? void 0 : bondData.chainId, enableZap: supportedByLIFI.includes(bondData === null || bondData === void 0 ? void 0 : bondData.chainId), bondPrincipalToken: bondData === null || bondData === void 0 ? void 0 : bondData.lpToken, tokenBalance: inputCurrencyBalance !== null && inputCurrencyBalance !== void 0 ? inputCurrencyBalance : undefined, selectedTokenPrice: inputTokenPrice === null || inputTokenPrice === void 0 ? void 0 : inputTokenPrice.price }), (bondData === null || bondData === void 0 ? void 0 : bondData.warningCard) && (jsx$2(Flex, { sx: {
81110
81077
  width: '100%',
81111
81078
  background: '#DE62F366',
81112
81079
  justifyContent: 'center',
@@ -81130,13 +81097,13 @@ const BuyComponentSolana = ({ onDismiss, bondAddress, bondChain, isProjectView,
81130
81097
  ? 'Complete KYC to Buy'
81131
81098
  : exceedsMaxBuy
81132
81099
  ? 'Exceeds Max Buy'
81133
- : zapError
81100
+ : exceedsBalance
81101
+ ? 'Insufficient balance'
81102
+ : zapError
81134
81103
  ? 'Swap quote failed'
81135
81104
  : !inputValue || parseFloat(inputValue) === 0
81136
81105
  ? 'Insert amount'
81137
- : isZap
81138
- ? 'Swap & Buy'
81139
- : 'buy' })] })) }) })] }) })) : (jsx$2(Fragment$1, {}));
81106
+ : 'buy' })] })) }) })] }) })) : (jsx$2(Fragment$1, {}));
81140
81107
  };
81141
81108
 
81142
81109
  const BuyBondModal = ({ onDismiss, bondAddress, bondChain, handlePurchasedBond, setBillId, }) => {
@@ -87213,39 +87180,37 @@ const ActiveBondRows = ({ chain, bonds, hideTitles, showHotBonds }) => {
87213
87180
  width: '100%',
87214
87181
  marginTop: '0px',
87215
87182
  }, className: "bonds-card-container", children: [[main.ChainId.SOL, main.ChainId.MONAD_TESTNET].includes(chain) && !hideTitles && jsx$2(ChainBanner, { chainId: chain }), bonds === null || bonds === void 0 ? void 0 : bonds.map((bondFromMap, index) => {
87216
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2;
87217
- if (bondFromMap.soldOut) {
87218
- const bond = bondFromMap;
87219
- return (jsx$2(BondRow, { bondAddress: (_a = bond.contractAddress) === null || _a === void 0 ? void 0 : _a[bond.chainId], billArtCollection: (_b = bond.billArt) === null || _b === void 0 ? void 0 : _b.collection, bondChain: bond.chainId, payoutToken: bond.earnToken, billType: bond.billType, tag: (_c = bond.tags) === null || _c === void 0 ? void 0 : _c[0], bondSoldOut: true, percentageAvailable: 100, remainingTokensString: `${formatNumberSI(0, 0)} ${bond.earnToken.symbol} ($${formatNumberSI(0, 2)})`, vestingTermString: "-", projectURL: bond.projectLink, twitterURL: bond.twitter, auditURL: bond.audit, shortDescription: bond.shortDescription }, `${bond.contractAddress}-${bond.chainId}-${index}`));
87220
- }
87183
+ // PRE TGE ROWS
87184
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
87221
87185
  if (bondFromMap.billType === 'fcfs') {
87222
87186
  const bond = bondFromMap;
87223
- const totalPrincipalBilled = Math.round(getBalanceNumber(new BigNumber$1((_d = bond === null || bond === void 0 ? void 0 : bond.totalPrincipalBilled) !== null && _d !== void 0 ? _d : '0'), (_f = (_e = bond === null || bond === void 0 ? void 0 : bond.lpToken) === null || _e === void 0 ? void 0 : _e.decimals) === null || _f === void 0 ? void 0 : _f[bond === null || bond === void 0 ? void 0 : bond.chainId])) / ((_g = bond.initPrice) !== null && _g !== void 0 ? _g : 0);
87224
- const raiseGoal = Math.round(getBalanceNumber(new BigNumber$1((_h = bond === null || bond === void 0 ? void 0 : bond.totalRaise) !== null && _h !== void 0 ? _h : '0'), (_k = (_j = bond === null || bond === void 0 ? void 0 : bond.lpToken) === null || _j === void 0 ? void 0 : _j.decimals) === null || _k === void 0 ? void 0 : _k[bond === null || bond === void 0 ? void 0 : bond.chainId])) / ((_l = bond.initPrice) !== null && _l !== void 0 ? _l : 0);
87187
+ const totalPrincipalBilled = Math.round(getBalanceNumber(new BigNumber$1((_a = bond === null || bond === void 0 ? void 0 : bond.totalPrincipalBilled) !== null && _a !== void 0 ? _a : '0'), (_c = (_b = bond === null || bond === void 0 ? void 0 : bond.lpToken) === null || _b === void 0 ? void 0 : _b.decimals) === null || _c === void 0 ? void 0 : _c[bond === null || bond === void 0 ? void 0 : bond.chainId])) / ((_d = bond.initPrice) !== null && _d !== void 0 ? _d : 0);
87188
+ const raiseGoal = Math.round(getBalanceNumber(new BigNumber$1((_e = bond === null || bond === void 0 ? void 0 : bond.totalRaise) !== null && _e !== void 0 ? _e : '0'), (_g = (_f = bond === null || bond === void 0 ? void 0 : bond.lpToken) === null || _f === void 0 ? void 0 : _f.decimals) === null || _g === void 0 ? void 0 : _g[bond === null || bond === void 0 ? void 0 : bond.chainId])) / ((_h = bond.initPrice) !== null && _h !== void 0 ? _h : 0);
87225
87189
  const tokensRemaining = raiseGoal - totalPrincipalBilled;
87226
- const tokensRemainingUSD = tokensRemaining * ((_m = bond === null || bond === void 0 ? void 0 : bond.initPrice) !== null && _m !== void 0 ? _m : 0);
87190
+ const tokensRemainingUSD = tokensRemaining * ((_j = bond === null || bond === void 0 ? void 0 : bond.initPrice) !== null && _j !== void 0 ? _j : 0);
87227
87191
  const percentageAvailable = 100 - Math.floor((totalPrincipalBilled * 100) / raiseGoal);
87228
- const earnToken = (_o = bond === null || bond === void 0 ? void 0 : bond.earnToken) === null || _o === void 0 ? void 0 : _o.symbol;
87229
- const baseBonus = (_r = (_q = (_p = bond === null || bond === void 0 ? void 0 : bond.trueBondPrices) === null || _p === void 0 ? void 0 : _p[0]) === null || _q === void 0 ? void 0 : _q.bonus) !== null && _r !== void 0 ? _r : 0;
87230
- const airdropBonus = (_s = bond === null || bond === void 0 ? void 0 : bond.airdropBonus) !== null && _s !== void 0 ? _s : 0;
87192
+ const earnToken = (_k = bond === null || bond === void 0 ? void 0 : bond.earnToken) === null || _k === void 0 ? void 0 : _k.symbol;
87193
+ const baseBonus = (_o = (_m = (_l = bond === null || bond === void 0 ? void 0 : bond.trueBondPrices) === null || _l === void 0 ? void 0 : _l[0]) === null || _m === void 0 ? void 0 : _m.bonus) !== null && _o !== void 0 ? _o : 0;
87194
+ const airdropBonus = (_p = bond === null || bond === void 0 ? void 0 : bond.airdropBonus) !== null && _p !== void 0 ? _p : 0;
87231
87195
  const bonus = baseBonus + airdropBonus;
87232
- const initialRelease = ((_t = bond === null || bond === void 0 ? void 0 : bond.initialRelease) !== null && _t !== void 0 ? _t : 0) * 100;
87196
+ const initialRelease = ((_q = bond === null || bond === void 0 ? void 0 : bond.initialRelease) !== null && _q !== void 0 ? _q : 0) * 100;
87233
87197
  const now = new Date().getTime();
87234
- const saleFinishTime = ((_u = bond === null || bond === void 0 ? void 0 : bond.finishTime) !== null && _u !== void 0 ? _u : 0) * 1000;
87198
+ const saleFinishTime = ((_r = bond === null || bond === void 0 ? void 0 : bond.finishTime) !== null && _r !== void 0 ? _r : 0) * 1000;
87235
87199
  const saleHasFinished = now > saleFinishTime || bond.finalized;
87236
- return (jsx$2(BondRow, { bondAddress: (_v = bond.contractAddress) === null || _v === void 0 ? void 0 : _v[bond.chainId], bondChain: bond.chainId, billArtCollection: (_w = bond.billArt) === null || _w === void 0 ? void 0 : _w.collection, payoutToken: bond.earnToken, billType: bond.billType, tag: (_x = bond.tags) === null || _x === void 0 ? void 0 : _x[0], bonus: saleHasFinished ? undefined : `${bonus}%`, airdropTooltip: bond.airdropTooltip, percentageAvailable: percentageAvailable, remainingTokensString: saleHasFinished
87200
+ return (jsx$2(BondRow, { bondAddress: (_s = bond.contractAddress) === null || _s === void 0 ? void 0 : _s[bond.chainId], bondChain: bond.chainId, billArtCollection: (_t = bond.billArt) === null || _t === void 0 ? void 0 : _t.collection, payoutToken: bond.earnToken, billType: bond.billType, tag: (_u = bond.tags) === null || _u === void 0 ? void 0 : _u[0], bonus: saleHasFinished ? undefined : `${bonus}%`, airdropTooltip: bond.airdropTooltip, percentageAvailable: percentageAvailable, remainingTokensString: saleHasFinished
87237
87201
  ? `0 ${earnToken} ($0) `
87238
87202
  : `${formatNumberSI(tokensRemaining, 0)} ${earnToken} ($${formatNumberSI(tokensRemainingUSD, 2)})`, vestingTermString: saleHasFinished
87239
87203
  ? '-'
87240
87204
  : initialRelease === 100
87241
87205
  ? `0 D`
87242
- : `${getTimePeriods((_y = bond.vestingTerm) !== null && _y !== void 0 ? _y : 0).months} Mo`, projectURL: bond.projectLink, twitterURL: bond.twitter, auditURL: bond.audit, bondSoldOut: saleHasFinished, shortDescription: bond.shortDescription }, `${bond.contractAddress}-${bond.chainId}-${index}`));
87206
+ : `${getTimePeriods((_v = bond.vestingTerm) !== null && _v !== void 0 ? _v : 0).months} Mo`, projectURL: bond.projectLink, twitterURL: bond.twitter, auditURL: bond.audit, bondSoldOut: saleHasFinished, shortDescription: bond.shortDescription }, `${bond.contractAddress}-${bond.chainId}-${index}`));
87243
87207
  }
87244
87208
  else {
87209
+ // POST TGE BONDS AKA NORMAL BONDS
87245
87210
  const bond = bondFromMap;
87246
- const bondAddress = (_z = bond === null || bond === void 0 ? void 0 : bond.contractAddress) === null || _z === void 0 ? void 0 : _z[bond === null || bond === void 0 ? void 0 : bond.chainId];
87211
+ const bondAddress = (_w = bond === null || bond === void 0 ? void 0 : bond.contractAddress) === null || _w === void 0 ? void 0 : _w[bond === null || bond === void 0 ? void 0 : bond.chainId];
87247
87212
  const remainingTokensString = getRemainingTokensString(bond);
87248
- return (jsx$2(BondRow, { bondAddress: bondAddress, bondChain: bond.chainId, billArtCollection: (_0 = bond.billArt) === null || _0 === void 0 ? void 0 : _0.collection, payoutToken: bond.earnToken, billType: bond.billType, tag: (_1 = bond.tags) === null || _1 === void 0 ? void 0 : _1[0], trueBondPrices: namingPreference === 'Bonus' ? bond.trueBondPrices : undefined, minTier: bond === null || bond === void 0 ? void 0 : bond.minTier, vestingTermString: getVestingTermsString(bond), vestingCliffString: getVestingTermsTooltipString(bond), percentageAvailable: remainingPercentage(bond), remainingTokensString: remainingTokensString, projectURL: bond.projectLink, twitterURL: bond.twitter, auditURL: bond.audit, bonus: namingPreference === 'Discount' ? `${(_2 = bond === null || bond === void 0 ? void 0 : bond.discountWithFee) === null || _2 === void 0 ? void 0 : _2.toFixed(2)}%` : undefined, shortDescription: bond.shortDescription }, `${bondAddress}-${bond.chainId}-${index}`));
87213
+ return (jsx$2(BondRow, { bondAddress: bondAddress, bondChain: bond.chainId, billArtCollection: (_x = bond.billArt) === null || _x === void 0 ? void 0 : _x.collection, payoutToken: bond.earnToken, billType: bond.billType, tag: (_y = bond.tags) === null || _y === void 0 ? void 0 : _y[0], trueBondPrices: namingPreference === 'Bonus' ? bond.trueBondPrices : undefined, minTier: bond === null || bond === void 0 ? void 0 : bond.minTier, vestingTermString: getVestingTermsString(bond), vestingCliffString: getVestingTermsTooltipString(bond), percentageAvailable: remainingPercentage(bond), remainingTokensString: remainingTokensString, projectURL: bond.projectLink, twitterURL: bond.twitter, auditURL: bond.audit, bonus: namingPreference === 'Discount' ? `${(_z = bond === null || bond === void 0 ? void 0 : bond.discountWithFee) === null || _z === void 0 ? void 0 : _z.toFixed(2)}%` : undefined, shortDescription: bond.shortDescription }, `${bondAddress}-${bond.chainId}-${index}`));
87249
87214
  }
87250
87215
  }), showHotBonds && (jsx$2(SwiperProvider, { children: jsx$2(HotBondCards, {}) }))] }, key))] }) }, key));
87251
87216
  };
@@ -2,5 +2,5 @@ import { Token } from '@ape.swap/apeswap-lists';
2
2
  import { BondsData } from '../../types/bonds';
3
3
  import { QuoteResponse } from '@jup-ag/api';
4
4
  declare const useJupiterSolanaQuote: (typedValue: string, inputCurrency: "NATIVE" | Token | undefined, bond: BondsData | undefined, account?: string, preferDirectRoutes?: boolean, // Try direct routes first for smaller tx size
5
- slippage?: number) => [loading: boolean, response: QuoteResponse | null, depositAmount: string, error: boolean, isDirect: boolean, minimumDepositAmount: string];
5
+ slippage?: number) => [loading: boolean, response: QuoteResponse | null, depositAmount: string, error: boolean, isDirect: boolean, minimumDepositAmount: string, wrapAndUnwrapSol: boolean];
6
6
  export default useJupiterSolanaQuote;
package/dist/styles.css CHANGED
@@ -790,7 +790,6 @@ span.flex-inline {
790
790
  display: flex;
791
791
  width: 50%;
792
792
  justify-content: flex-end;
793
- opacity: 0.6;
794
793
  align-items: center;
795
794
  }
796
795
  @media screen and (min-width: 1000px) {
@@ -804,6 +803,7 @@ span.flex-inline {
804
803
  width: 170px;
805
804
  align-items: flex-end;
806
805
  cursor: pointer;
806
+ opacity: 0.6;
807
807
  padding-left: 15px;
808
808
  }
809
809
  @media screen and (min-width: 513px) {
@@ -830,6 +830,7 @@ span.flex-inline {
830
830
  width: 115px;
831
831
  align-items: flex-end;
832
832
  justify-content: center;
833
+ opacity: 0.6;
833
834
  cursor: pointer;
834
835
  }
835
836
  @media screen and (min-width: 1000px) {
@@ -843,6 +844,7 @@ span.flex-inline {
843
844
  align-items: flex-end;
844
845
  justify-content: center;
845
846
  cursor: pointer;
847
+ opacity: 0.6;
846
848
  }
847
849
  @media screen and (min-width: 1000px) {
848
850
  .bonds-menu .tokens-remaining-header {
@@ -0,0 +1,9 @@
1
+ import { Connection, PublicKey, TransactionInstruction } from '@solana/web3.js';
2
+ /**
3
+ * Checks if an Associated Token Account exists and returns creation instruction if needed
4
+ * @returns Object with ATA address and optional creation instruction
5
+ */
6
+ export declare const getAtaWithCreateInstruction: (connection: Connection, mint: PublicKey, owner: PublicKey, payer?: PublicKey) => Promise<{
7
+ address: PublicKey;
8
+ createInstruction: TransactionInstruction | null;
9
+ }>;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Ape Bond SDK",
4
4
  "author": "Ape Bond",
5
5
  "license": "MIT",
6
- "version": "4.4.0-test.2",
6
+ "version": "4.4.0-test.4",
7
7
  "module": "dist/main.js",
8
8
  "type": "module",
9
9
  "types": "dist/main.d.ts",
@@ -73,12 +73,12 @@
73
73
  "sass": "^1.77.7",
74
74
  "typescript": "^5.0.0",
75
75
  "typescript-eslint": "^8.34.0",
76
- "vite": "6.4.1",
76
+ "vite": "7.1.12",
77
77
  "yalc": "^1.0.0-pre.53"
78
78
  },
79
79
  "dependencies": {
80
80
  "@jup-ag/api": "6.0.45",
81
- "@ape.swap/apeswap-lists": "4.4.6",
81
+ "@ape.swap/apeswap-lists": "4.4.7",
82
82
  "@emotion/react": "11.14.0",
83
83
  "bignumber.js": "^9.1.2",
84
84
  "buffer": "^6.0.3",