BlogDocs

fix(ts): import of coinbase sdk in vite(#3562)

Merged
Merging
fix/vite-coinbase-import
(
98a9e22
) into
main
(
a1d6a3c
)
0%
IMPROVEMENTS
0
REGRESSIONS
0
UNTOUCHED
9
NEW
0
DROPPED
0
IGNORED
0

Benchmarks

Passed

encode tx (prepared method)
packages/thirdweb/src/transaction/actions/encode.bench.ts::encode tx (prepared method)
+2%
343.8 µs
338.3 µs
units:toUnits("40", 18)
packages/thirdweb/src/utils/units.bench.ts::units:toUnits("40", 18)
+1%
33.7 µs
33.5 µs
units:toUnits("40.0", 18)
packages/thirdweb/src/utils/units.bench.ts::units:toUnits("40.0", 18)
+1%
34.3 µs
34.1 µs
units:toTokens(12345678901234567890n, 18)
packages/thirdweb/src/utils/units.bench.ts::units:toTokens(12345678901234567890n, 18)
0%
25.2 µs
25.1 µs
keccakId
packages/thirdweb/src/utils/any-evm/keccak-id.bench.ts::keccakId
0%
1.3 ms
1.3 ms
units:toTokens(40000000000000000000n, 18)
packages/thirdweb/src/utils/units.bench.ts::units:toTokens(40000000000000000000n, 18)
0%
184.6 µs
184.6 µs
encode tx (contract abi)
packages/thirdweb/src/transaction/actions/encode.bench.ts::encode tx (contract abi)
0%
408.3 µs
409.1 µs
encode tx (human readable)
packages/thirdweb/src/transaction/actions/encode.bench.ts::encode tx (human readable)
-1%
408.2 µs
410.4 µs
encode tx (json abi)
packages/thirdweb/src/transaction/actions/encode.bench.ts::encode tx (json abi)
-1%
190.9 µs
193 µs

Commits

Click on a commit to change the comparison range
base
main
a1d6a3c
0%
fix(ts): import of coinbase sdk in vite (#3562) ### TL;DR Corrected the import handling for CoinbaseWalletSDK in the coinbaseWebSDK.ts file. ### What changed? The import statement for CoinbaseWalletSDK was modified to handle cases where the import does not return a default function directly. ### How to test? - Verify the Coinbase wallet integration in the application. - Ensure that different environments (e.g., development, production) can import and utilize the CoinbaseWalletSDK without errors. ### Why make this change? This change ensures that the CoinbaseWalletSDK import is handled correctly, thereby preventing potential import errors that could occur in various environments. --- <!-- start pr-codex --> --- ## PR-Codex overview This PR fixes coinbase wallet connections on Vite by addressing import errors related to `CoinbaseWalletSDK`. ### Detailed summary - Fixed import error for `CoinbaseWalletSDK` on Vite - Added workaround for Vite dev import issues - Ensured proper initialization of `CoinbaseWalletSDK` to connect coinbase wallet > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
98a9e22
3 months ago
by gregfromstl
ResourcesHomePricingDocsBlogGitHubChangelog