@imtbl/sdk 1.25.1 → 1.26.1-alpha.1

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/checkout.js CHANGED
@@ -140,7 +140,7 @@ const flattenProperties$1 = (properties) => {
140
140
  };
141
141
 
142
142
  // WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
143
- const SDK_VERSION$1 = '1.25.1';
143
+ const SDK_VERSION$1 = '1.26.1-alpha.1';
144
144
  const getReferrer$1 = () => {
145
145
  if (isNode$1()) {
146
146
  return '';
@@ -17551,7 +17551,7 @@ const flattenProperties = (properties) => {
17551
17551
  };
17552
17552
 
17553
17553
  // WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
17554
- const SDK_VERSION = '1.25.1';
17554
+ const SDK_VERSION = '1.26.1-alpha.1';
17555
17555
  const getReferrer = () => {
17556
17556
  if (isNode()) {
17557
17557
  return '';
@@ -28254,7 +28254,7 @@ class APIError extends Error {
28254
28254
 
28255
28255
  /* eslint-disable implicit-arrow-linebreak */
28256
28256
  const defaultHeaders = {
28257
- sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-1.25.1',
28257
+ sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-1.26.1-alpha.1',
28258
28258
  };
28259
28259
  /**
28260
28260
  * createAPIConfiguration to create a custom Configuration
@@ -29685,7 +29685,7 @@ const IMMUTABLE_ZKVEM_GAS_OVERRIDES = {
29685
29685
  maxPriorityFeePerGas: BigNumber$1.from(10e9),
29686
29686
  };
29687
29687
 
29688
- const SDK_VERSION_MARKER = '1.25.1';
29688
+ const SDK_VERSION_MARKER = '1.26.1-alpha.1';
29689
29689
  // This SDK version is replaced by the `yarn build` command ran on the root level
29690
29690
  const globalPackageVersion = () => SDK_VERSION_MARKER;
29691
29691
 
@@ -33231,7 +33231,7 @@ class FiatRampService {
33231
33231
  return config[OnRampProvider.TRANSAK]?.fees;
33232
33232
  }
33233
33233
  async createWidgetUrl(params) {
33234
- return (await this.getTransakWidgetUrl(params));
33234
+ return await this.getTransakWidgetUrl(params);
33235
33235
  }
33236
33236
  async getTransakWidgetUrl(params) {
33237
33237
  const onRampConfig = (await this.config.remote.getConfig('onramp'));
@@ -33245,8 +33245,6 @@ class FiatRampService {
33245
33245
  productsAvailed: 'buy',
33246
33246
  exchangeScreenTitle: 'Buy',
33247
33247
  themeColor: '0D0D0D',
33248
- defaultFiatCurrency: 'usd',
33249
- defaultFiatAmount: '50',
33250
33248
  defaultCryptoCurrency: params.tokenSymbol || 'IMX',
33251
33249
  };
33252
33250
  if (params.isPassport && params.email) {
@@ -33257,6 +33255,9 @@ class FiatRampService {
33257
33255
  disableWalletAddressForm: true,
33258
33256
  };
33259
33257
  }
33258
+ // NOTE: only set tokenAmount and tokenSymbol if you want a fixed pre-selected token with no currency selector
33259
+ // setting cryptoCurrencyCode code will force the user to buy that token, defaultCryptoAmount will not work without cryptoCurrencyCode
33260
+ // setting defaultFiatAmount/fiatAmount + defaultFiatCurrency will take a higher priority over defaultCryptoAmount + cryptoCurrencyCode
33260
33261
  if (params.tokenAmount && params.tokenSymbol) {
33261
33262
  widgetParams = {
33262
33263
  ...widgetParams,
@@ -33264,6 +33265,13 @@ class FiatRampService {
33264
33265
  cryptoCurrencyCode: params.tokenSymbol,
33265
33266
  };
33266
33267
  }
33268
+ else {
33269
+ widgetParams = {
33270
+ ...widgetParams,
33271
+ defaultFiatAmount: 50,
33272
+ defaultFiatCurrency: 'usd',
33273
+ };
33274
+ }
33267
33275
  if (params.walletAddress) {
33268
33276
  widgetParams = {
33269
33277
  ...widgetParams,
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.25.1';
131
+ const SDK_VERSION = '1.26.1-alpha.1';
132
132
  const getReferrer = () => {
133
133
  if (isNode()) {
134
134
  return '';