@coinmasters/toolbox-evm
Advanced tools
Comparing version 11.0.3 to 11.0.4
@@ -1030,2 +1030,4 @@ import type { Asset } from '@coinmasters/types'; | ||
export declare const okxMobileEnabled: () => boolean; | ||
export declare const OPToolbox: ({ api, provider, signer, covalentApiKey, }: { | ||
@@ -1032,0 +1034,0 @@ api?: { |
@@ -1,5 +0,5 @@ | ||
import { aY as o, aZ as t, a_ as b, a$ as l, aS as r, aT as d, b0 as A, bj as i, b2 as T, aW as c, b3 as h, bc as n, b8 as x, b4 as g, bb as k, b5 as w, bh as p, aU as E, bd as M, bi as S, aV as W, b1 as m, ba as C, be as B, bf as V, b6 as u, b9 as N, aX as P, bg as f, b7 as D } from "./index-98970cee.js"; | ||
import { aY as s, aZ as t, a_ as b, a$ as l, aS as r, aT as d, b0 as i, bk as A, b2 as T, aW as c, b3 as h, bc as n, b8 as x, b4 as k, bb as g, b5 as w, bi as E, aU as M, bd as p, bj as S, aV as W, b1 as m, ba as C, be as B, bg as V, bf as u, b6 as N, b9 as P, aX as f, bh as D, b7 as H } from "./index-a22f83cd.js"; | ||
import "@coinmasters/helpers"; | ||
export { | ||
o as ARBToolbox, | ||
s as ARBToolbox, | ||
t as AVAXToolbox, | ||
@@ -10,4 +10,4 @@ b as BASEToolbox, | ||
d as EIP1193SendTransaction, | ||
A as ETHToolbox, | ||
i as EthNetwork, | ||
i as ETHToolbox, | ||
A as EthNetwork, | ||
T as MATICToolbox, | ||
@@ -18,8 +18,8 @@ c as MAX_APPROVAL, | ||
x as addEVMWalletNetwork, | ||
g as covalentApi, | ||
k as estimateMaxSendableAmount, | ||
k as covalentApi, | ||
g as estimateMaxSendableAmount, | ||
w as ethplorerApi, | ||
p as getBalance, | ||
E as getChecksumAddressFromAsset, | ||
M as getETHDefaultWallet, | ||
E as getBalance, | ||
M as getChecksumAddressFromAsset, | ||
p as getETHDefaultWallet, | ||
S as getProvider, | ||
@@ -31,7 +31,8 @@ W as getTokenAddress, | ||
V as isWeb3Detected, | ||
u as prepareNetworkSwitch, | ||
N as switchEVMWalletNetwork, | ||
P as toChecksumAddress, | ||
f as toHexString, | ||
D as wrapMethodWithNetworkSwitch | ||
u as okxMobileEnabled, | ||
N as prepareNetworkSwitch, | ||
P as switchEVMWalletNetwork, | ||
f as toChecksumAddress, | ||
D as toHexString, | ||
H as wrapMethodWithNetworkSwitch | ||
}; |
@@ -5,3 +5,3 @@ { | ||
"ethers": "6.9.0", | ||
"@coinmasters/types": "4.7.3" | ||
"@coinmasters/types": "4.7.4" | ||
}, | ||
@@ -18,4 +18,4 @@ "description": "THORSwap evm", | ||
"vitest": "0.34.6", | ||
"@internal/config": "2.7.3", | ||
"@coinmasters/helpers": "11.0.3" | ||
"@internal/config": "2.7.4", | ||
"@coinmasters/helpers": "11.0.4" | ||
}, | ||
@@ -26,3 +26,3 @@ "eslintConfig": { | ||
"peerDependencies": { | ||
"@coinmasters/helpers": "11.0.3" | ||
"@coinmasters/helpers": "11.0.4" | ||
}, | ||
@@ -52,3 +52,3 @@ "exports": { | ||
"types": "./dist/index.d.ts", | ||
"version": "11.0.3", | ||
"version": "11.0.4", | ||
"scripts": { | ||
@@ -55,0 +55,0 @@ "build": "vite build", |
@@ -46,3 +46,2 @@ import { AssetValue, formatBigIntToSafeValue, SwapKitNumber } from '@coinmasters/helpers'; | ||
'transfer', | ||
'getBalance', | ||
'isApproved', | ||
@@ -341,2 +340,3 @@ 'approvedAmount', | ||
if (coinbaseEnabled) wallets.push(WalletOption.COINBASE_WEB); | ||
if (okxMobileEnabled()) wallets.push(WalletOption.OKX_MOBILE); | ||
@@ -346,2 +346,12 @@ return wallets; | ||
export const okxMobileEnabled = () => { | ||
const ua = navigator.userAgent; | ||
const isIOS = /iphone|ipad|ipod|ios/i.test(ua); | ||
const isAndroid = /android|XiaoMi|MiuiBrowser/i.test(ua); | ||
const isMobile = isIOS || isAndroid; | ||
const isOKApp = /OKApp/i.test(ua); | ||
return isMobile && isOKApp; | ||
}; | ||
export const isWeb3Detected = () => typeof window.ethereum !== 'undefined'; | ||
@@ -348,0 +358,0 @@ export const toHexString = (value: bigint) => (value > 0n ? `0x${value.toString(16)}` : '0x0'); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 2 instances in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 2 instances in 1 package
868225
18426
3
+ Added@coinmasters/helpers@11.0.4(transitive)
+ Added@coinmasters/tokens@3.7.4(transitive)
+ Added@coinmasters/types@4.7.4(transitive)
- Removed@coinmasters/helpers@11.0.3(transitive)
- Removed@coinmasters/tokens@3.7.3(transitive)
- Removed@coinmasters/types@4.7.3(transitive)
Updated@coinmasters/types@4.7.4