Skip to content

Commit

Permalink
Fix: Add null check for chain to secondary token balance flow (#1718)
Browse files Browse the repository at this point in the history
* Add null check for secondaryTokenBals

* Bump versions
  • Loading branch information
Adamj1232 authored May 15, 2023
1 parent 690cb6f commit 0483fb4
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@web3-onboard/core",
"version": "2.18.0",
"version": "2.18.1-alpha.1",
"description": "Web3-Onboard makes it simple to connect Ethereum hardware and software wallets to your dapp. Features standardized spec compliant web3 providers for all supported wallets, framework agnostic modern javascript UI with code splitting, CSS customization, multi-chain and multi-account support, reactive wallet state subscriptions and real-time transaction state change notifications.",
"keywords": [
"Ethereum",
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/update-balances.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export const updateSecondaryTokens = async (
account: AccountAddress,
chain: Chain
): Promise<SecondaryTokenBalances[]> => {
if (!chain) return
const chainRPC = chain.rpcUrl
if (!chain.secondaryTokens || !chain.secondaryTokens.length || !chainRPC)
return
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/views/connect/Index.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,7 @@
})
}
if (
appChain &&
!secondaryTokens &&
Array.isArray(appChain.secondaryTokens) &&
appChain.secondaryTokens.length
Expand Down
2 changes: 1 addition & 1 deletion packages/demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"webpack-dev-server": "4.7.4"
},
"dependencies": {
"@web3-onboard/core": "^2.18.0",
"@web3-onboard/core": "^2.18.1-alpha.1",
"@web3-onboard/coinbase": "^2.2.3",
"@web3-onboard/transaction-preview": "^2.0.7",
"@web3-onboard/dcent": "^2.2.6",
Expand Down
4 changes: 2 additions & 2 deletions packages/react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@web3-onboard/react",
"version": "2.8.2",
"version": "2.8.3-alpha.1",
"description": "A collection of React hooks for integrating Web3-Onboard in to React and Next.js projects. Web3-Onboard makes it simple to connect Ethereum hardware and software wallets to your dapp. Features standardised spec compliant web3 providers for all supported wallets, modern javascript UI with code splitting, CSS customization, multi-chain and multi-account support, reactive wallet state subscriptions and real-time transaction state change notifications.",
"keywords": [
"Ethereum",
Expand Down Expand Up @@ -62,7 +62,7 @@
"typescript": "^4.5.5"
},
"dependencies": {
"@web3-onboard/core": "^2.18.0",
"@web3-onboard/core": "^2.18.1-alpha.1",
"@web3-onboard/common": "^2.3.2",
"use-sync-external-store": "1.0.0"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/vue/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@web3-onboard/vue",
"version": "2.7.1",
"version": "2.7.2-alpha.1",
"description": "A collection of Vue Composables for integrating Web3-Onboard in to a Vue or Nuxt project. Web3-Onboard makes it simple to connect Ethereum hardware and software wallets to your dapp. Features standardized spec compliant web3 providers for all supported wallets, modern javascript UI with code splitting, CSS customization, multi-chain and multi-account support, reactive wallet state subscriptions and real-time transaction state change notifications.",
"keywords": [
"Ethereum",
Expand Down Expand Up @@ -63,7 +63,7 @@
"@vueuse/core": "^8.4.2",
"@vueuse/rxjs": "^8.2.0",
"@web3-onboard/common": "^2.3.2",
"@web3-onboard/core": "^2.18.0",
"@web3-onboard/core": "^2.18.1-alpha.1",
"vue-demi": "^0.12.4"
},
"peerDependencies": {
Expand Down

0 comments on commit 0483fb4

Please sign in to comment.