@imtbl/sdk 1.19.6-alpha → 1.20.0-alpha

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.
Files changed (36) hide show
  1. package/dist/blockchain_data.js +2 -2
  2. package/dist/browser/checkout/{BridgeWidget-24521d11.js → BridgeWidget-312cb2c2.js} +1 -1
  3. package/dist/browser/checkout/{HorizontalMenu-actual-6612c0c3.js → HorizontalMenu-actual-4dbb5c81.js} +1 -1
  4. package/dist/browser/checkout/{OnRampWidget-d264f707.js → OnRampWidget-1340f0cc.js} +1 -1
  5. package/dist/browser/checkout/SaleWidget-be034e41.js +2 -0
  6. package/dist/browser/checkout/{SpendingCapHero-0db6d7ed.js → SpendingCapHero-39ee51d6.js} +1 -1
  7. package/dist/browser/checkout/{SwapWidget-2c06420c.js → SwapWidget-e092d01c.js} +1 -1
  8. package/dist/browser/checkout/{TopUpView-d9658bbd.js → TopUpView-6e32a129.js} +1 -1
  9. package/dist/browser/checkout/{WalletWidget-43fb112d.js → WalletWidget-abb75fc8.js} +1 -1
  10. package/dist/browser/checkout/{auto-track-a398bcd2.js → auto-track-0ac33efe.js} +1 -1
  11. package/dist/browser/checkout/{balance-124a9c3c.js → balance-713e469c.js} +1 -1
  12. package/dist/browser/checkout/{index-5327f330.js → index-2d9d6340.js} +1 -1
  13. package/dist/browser/checkout/{index-dcf79a29.js → index-4f810b18.js} +1 -1
  14. package/dist/browser/checkout/{index-384fe7dd.js → index-63dc0a81.js} +1 -1
  15. package/dist/browser/checkout/{index-80d8482d.js → index-a8a9e072.js} +2 -2
  16. package/dist/browser/checkout/{index-e22be227.js → index-ad4dc41d.js} +1 -1
  17. package/dist/browser/checkout/{index-bc84abbd.js → index-ceb8406f.js} +1 -1
  18. package/dist/browser/checkout/{index-6e2b798d.js → index-d2f39097.js} +1 -1
  19. package/dist/browser/checkout/index-e0acfcc2.js +1 -0
  20. package/dist/browser/checkout/{index.umd-4fe7c784.js → index.umd-74591847.js} +1 -1
  21. package/dist/browser/checkout/{retry-21d3107e.js → retry-5e0ff99b.js} +1 -1
  22. package/dist/browser/checkout/sdk.js +4 -4
  23. package/dist/browser/checkout/widgets-esm.js +1 -1
  24. package/dist/browser/checkout/widgets.js +4 -4
  25. package/dist/checkout.js +41 -31
  26. package/dist/config.js +1 -1
  27. package/dist/index.browser.js +11 -11
  28. package/dist/index.browser.js.map +1 -1
  29. package/dist/index.cjs +46 -42
  30. package/dist/index.js +47 -42
  31. package/dist/orderbook.js +1 -1
  32. package/dist/passport.js +7 -12
  33. package/dist/x.js +6 -11
  34. package/package.json +1 -1
  35. package/dist/browser/checkout/SaleWidget-82dbc082.js +0 -2
  36. package/dist/browser/checkout/index-9ed7d230.js +0 -1
package/dist/checkout.js CHANGED
@@ -139,7 +139,7 @@ const flattenProperties$1 = (properties) => {
139
139
  };
140
140
 
141
141
  // WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
142
- const SDK_VERSION$1 = '1.19.6-alpha';
142
+ const SDK_VERSION$1 = '1.20.0-alpha';
143
143
  const getReferrer$1 = () => {
144
144
  if (isNode$1()) {
145
145
  return '';
@@ -17550,7 +17550,7 @@ const flattenProperties = (properties) => {
17550
17550
  };
17551
17551
 
17552
17552
  // WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
17553
- const SDK_VERSION = '1.19.6-alpha';
17553
+ const SDK_VERSION = '1.20.0-alpha';
17554
17554
  const getReferrer = () => {
17555
17555
  if (isNode()) {
17556
17556
  return '';
@@ -28036,7 +28036,7 @@ class APIError extends Error {
28036
28036
 
28037
28037
  /* eslint-disable implicit-arrow-linebreak */
28038
28038
  const defaultHeaders = {
28039
- sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-1.19.6-alpha',
28039
+ sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-1.20.0-alpha',
28040
28040
  };
28041
28041
  /**
28042
28042
  * createAPIConfiguration to create a custom Configuration
@@ -29467,7 +29467,7 @@ const IMMUTABLE_ZKVEM_GAS_OVERRIDES = {
29467
29467
  maxPriorityFeePerGas: BigNumber$1.from(10e9),
29468
29468
  };
29469
29469
 
29470
- const SDK_VERSION_MARKER = '1.19.6-alpha';
29470
+ const SDK_VERSION_MARKER = '1.20.0-alpha';
29471
29471
  // This SDK version is replaced by the `yarn build` command ran on the root level
29472
29472
  const globalPackageVersion = () => SDK_VERSION_MARKER;
29473
29473
 
@@ -32978,44 +32978,54 @@ class FiatRampService {
32978
32978
  return (await this.getTransakWidgetUrl(params));
32979
32979
  }
32980
32980
  async getTransakWidgetUrl(params) {
32981
- let widgetUrl = `${TRANSAK_API_BASE_URL[this.config.environment]}?`;
32982
32981
  const onRampConfig = (await this.config.remote.getConfig('onramp'));
32983
- const apiKey = onRampConfig[OnRampProvider.TRANSAK].publishableApiKey;
32984
- const transakPublishableKey = `apiKey=${apiKey}`;
32985
- const zkevmNetwork = 'network=immutablezkevm';
32986
- const defaultPaymentMethod = 'defaultPaymentMethod=credit_debit_card';
32987
- const disableBankTransfer = 'disablePaymentMethods=sepa_bank_transfer,gbp_bank_transfer,'
32988
- + 'pm_cash_app,pm_jwire,pm_paymaya,pm_bpi,pm_ubp,pm_grabpay,pm_shopeepay,pm_gcash,pm_pix,'
32989
- + 'pm_astropay,pm_pse,inr_bank_transfer';
32990
- const productsAvailed = 'productsAvailed=buy';
32991
- const exchangeScreenTitle = 'exchangeScreenTitle=Buy';
32992
- const themeColor = 'themeColor=0D0D0D';
32993
- const defaultFiat = 'defaultFiatAmount=50&defaultFiatCurrency=usd';
32994
- widgetUrl += `${transakPublishableKey}&`
32995
- + `${zkevmNetwork}&`
32996
- + `${defaultPaymentMethod}&`
32997
- + `${disableBankTransfer}&`
32998
- + `${productsAvailed}&`
32999
- + `${exchangeScreenTitle}&`
33000
- + `${themeColor}&`
33001
- + `${defaultFiat}`;
32982
+ const widgetUrl = TRANSAK_API_BASE_URL[this.config.environment];
32983
+ let widgetParams = {
32984
+ apiKey: onRampConfig[OnRampProvider.TRANSAK].publishableApiKey,
32985
+ network: 'immutablezkevm',
32986
+ defaultPaymentMethod: 'credit_debit_card',
32987
+ disablePaymentMethods: 'sepa_bank_transfer,gbp_bank_transfer,pm_cash_app,pm_jwire,pm_paymaya,'
32988
+ + 'pm_bpi,pm_ubp,pm_grabpay,pm_shopeepay,pm_gcash,pm_pix,pm_astropay,pm_pse,inr_bank_transfer',
32989
+ productsAvailed: 'buy',
32990
+ exchangeScreenTitle: 'Buy',
32991
+ themeColor: '0D0D0D',
32992
+ defaultFiatCurrency: 'usd',
32993
+ };
33002
32994
  if (params.isPassport && params.email) {
33003
- const encodedEmail = encodeURIComponent(params.email);
33004
- widgetUrl += `&email=${encodedEmail}&isAutoFillUserData=true&disableWalletAddressForm=true`;
32995
+ widgetParams = {
32996
+ ...widgetParams,
32997
+ email: encodeURIComponent(params.email),
32998
+ isAutoFillUserData: true,
32999
+ disableWalletAddressForm: true,
33000
+ };
33005
33001
  }
33006
33002
  if (params.tokenAmount && params.tokenSymbol) {
33007
- widgetUrl += `&defaultCryptoAmount=${params.tokenAmount}&defaultCryptoCurrency=${params.tokenSymbol}`;
33003
+ widgetParams = {
33004
+ ...widgetParams,
33005
+ defaultCryptoAmount: params.tokenAmount,
33006
+ cryptoCurrencyCode: params.tokenSymbol,
33007
+ };
33008
33008
  }
33009
33009
  else {
33010
- widgetUrl += '&defaultCryptoCurrency=IMX';
33010
+ widgetParams = {
33011
+ ...widgetParams,
33012
+ defaultFiatAmount: '50',
33013
+ defaultCryptoCurrency: 'IMX',
33014
+ };
33011
33015
  }
33012
33016
  if (params.walletAddress) {
33013
- widgetUrl += `&walletAddress=${params.walletAddress}`;
33017
+ widgetParams = {
33018
+ ...widgetParams,
33019
+ walletAddress: params.walletAddress,
33020
+ };
33014
33021
  }
33015
33022
  if (params.allowedTokens) {
33016
- widgetUrl += `&cryptoCurrencyList=${params.allowedTokens?.join(',').toLowerCase()}`;
33023
+ widgetParams = {
33024
+ ...widgetParams,
33025
+ cryptoCurrencyList: params.allowedTokens?.join(',').toLowerCase(),
33026
+ };
33017
33027
  }
33018
- return widgetUrl;
33028
+ return `${widgetUrl}?${new URLSearchParams(widgetParams).toString()}`;
33019
33029
  }
33020
33030
  }
33021
33031
 
package/dist/config.js CHANGED
@@ -128,7 +128,7 @@ const flattenProperties = (properties) => {
128
128
  };
129
129
 
130
130
  // WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
131
- const SDK_VERSION = '1.19.6-alpha';
131
+ const SDK_VERSION = '1.20.0-alpha';
132
132
  const getReferrer = () => {
133
133
  if (isNode()) {
134
134
  return '';