@rango-dev/widget-embedded 0.1.11-next.19 → 0.1.11-next.20

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/lib.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"lib.d.ts","sourceRoot":"","sources":["src/lib.tsx"],"names":[],"mappings":"AACA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAgBnD,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,OAAO,QAAQ,CAAC;AAKhB,oBAAY,WAAW,GAAG;IACxB,MAAM,CAAC,EAAE,YAAY,CAAC;CACvB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CA0GzC,CAAC"}
1
+ {"version":3,"file":"lib.d.ts","sourceRoot":"","sources":["src/lib.tsx"],"names":[],"mappings":"AACA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAgB5D,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,OAAO,QAAQ,CAAC;AAMhB,oBAAY,WAAW,GAAG;IACxB,MAAM,CAAC,EAAE,YAAY,CAAC;CACvB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAkHzC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"configs.d.ts","sourceRoot":"","sources":["../src/utils/configs.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,OAAO;IACtB,OAAO,EAAE,MAAM,CAAC;CACjB;AAQD,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,OAAO,UAE5C;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,OAAO,EAAE,KAAK,EAAE,GAAG,OAIxD;AAED,wBAAgB,UAAU,CAAC,WAAW,EAAE,OAAO,WAG9C"}
1
+ {"version":3,"file":"configs.d.ts","sourceRoot":"","sources":["../src/utils/configs.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,OAAO;IACtB,OAAO,EAAE,MAAM,CAAC;CACjB;AAQD,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,OAAO,UAE5C;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,OAAO,EAAE,KAAK,EAAE,GAAG,OAIxD;AAED,wBAAgB,UAAU,CAAC,WAAW,EAAE,OAAO,WAS9C"}
@@ -231,6 +231,16 @@ let configs = {
231
231
  function getConfig(name) {
232
232
  return configs[name];
233
233
  }
234
+ function initConfig(nextConfigs) {
235
+ let clonedConfigs;
236
+ if (typeof structuredClone === 'function') {
237
+ clonedConfigs = structuredClone(nextConfigs);
238
+ } else {
239
+ clonedConfigs = JSON.parse(JSON.stringify(nextConfigs));
240
+ }
241
+ configs = clonedConfigs;
242
+ return configs;
243
+ }
234
244
 
235
245
  let rango = undefined;
236
246
  const httpService = () => {
@@ -3410,6 +3420,13 @@ const SwapBox = _ref => {
3410
3420
  const [disconnectedWallet, setDisconnectedWallet] = React.useState();
3411
3421
  const currentPage = useUiStore.use.currentPage();
3412
3422
  const evmBasedChainNames = blockchains.filter(rangoSdk.isEvmBlockchain).map(chain => chain.name);
3423
+ React.useMemo(() => {
3424
+ if (config?.apiKey) {
3425
+ initConfig({
3426
+ API_KEY: config?.apiKey
3427
+ });
3428
+ }
3429
+ }, [config]);
3413
3430
  const onUpdateState = (type, event, value, state, supportedChains) => {
3414
3431
  if (event === walletsCore.Events.ACCOUNTS) {
3415
3432
  if (value) {