@rango-dev/queue-manager-rango-preset 0.1.13-next.12 → 0.1.13-next.14

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rango-dev/queue-manager-rango-preset",
3
- "version": "0.1.13-next.12",
3
+ "version": "0.1.13-next.14",
4
4
  "license": "MIT",
5
5
  "module": "dist/queue-manager-rango-preset.esm.js",
6
6
  "main": "dist/index.js",
package/src/helpers.ts CHANGED
@@ -494,9 +494,13 @@ export function getRequiredWallet(swap: PendingSwap): {
494
494
  */
495
495
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
496
496
  async function getChainId(provider: any): Promise<string | number | null> {
497
- const chainId: number | string | null =
498
- (await provider.request({ method: 'eth_chainId' })) || provider?.chainId;
499
- return chainId;
497
+ try {
498
+ const chainId: number | string | null =
499
+ (await provider.request({ method: 'eth_chainId' })) || provider?.chainId;
500
+ return chainId;
501
+ } catch {
502
+ return provider?.chainId;
503
+ }
500
504
  }
501
505
 
502
506
  /**
@@ -809,7 +813,7 @@ export function isRequiredWalletConnected(
809
813
 
810
814
  const matched = connectedAccounts.some((account) => {
811
815
  const { address: accountAddress } = readAccountAddress(account);
812
- return address === accountAddress;
816
+ return address.toLocaleLowerCase() === accountAddress.toLocaleLowerCase();
813
817
  });
814
818
  return { ok: matched, reason: 'account_miss_match' };
815
819
  }