diff --git a/packages/core/package.json b/packages/core/package.json index c7cc183f5..6f604df54 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@web3-onboard/core", - "version": "2.7.0-alpha.3", + "version": "2.7.0-alpha.4", "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", diff --git a/packages/core/src/views/Index.svelte b/packages/core/src/views/Index.svelte index 4ee459635..77bc4d4ec 100644 --- a/packages/core/src/views/Index.svelte +++ b/packages/core/src/views/Index.svelte @@ -5,8 +5,6 @@ import Connect from './connect/Index.svelte' import SwitchChain from './chain/SwitchChain.svelte' import ActionRequired from './connect/ActionRequired.svelte' - import AccountCenter from './account-center/Index.svelte' - import Notify from './notify/Index.svelte' import { configuration } from '../configuration' import type { Observable } from 'rxjs' import type { Notification } from '../types' @@ -43,6 +41,14 @@ } } + const accountCenterComponent = $accountCenter$.enabled + ? import('./account-center/Index.svelte').then(mod => mod.default) + : Promise.resolve(null) + + const notifyComponent = $notify$.enabled + ? import('./notify/Index.svelte').then(mod => mod.default) + : Promise.resolve(null) + $: sharedContainer = $accountCenter$.enabled && $notify$.enabled && @@ -359,11 +365,16 @@ : ''} " > {#if $notify$.position.includes('bottom') && $accountCenter$.position.includes('bottom') && samePositionOrMobile} - + {#await notifyComponent then Notify} + {#if Notify} + + {/if} + {/await} {/if}
- + {#await accountCenterComponent then AccountCenter} + {#if AccountCenter} + + {/if} + {/await}
{#if $notify$.position.includes('top') && $accountCenter$.position.includes('top') && samePositionOrMobile} - + {#await notifyComponent then Notify} + {#if Notify} + + {/if} + {/await} {/if} {/if} @@ -410,7 +430,11 @@ : ''} > {#if $accountCenter$.enabled && $wallets$.length} - + {#await accountCenterComponent then AccountCenter} + {#if AccountCenter} + + {/if} + {/await} {/if} @@ -426,10 +450,15 @@ ? 'padding-top:0;' : ''} " > - + {#await notifyComponent then Notify} + {#if Notify} + + {/if} + {/await} {/if} diff --git a/packages/react/package.json b/packages/react/package.json index 8b359aca1..ed7ec3290 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -62,7 +62,7 @@ "typescript": "^4.5.5" }, "dependencies": { - "@web3-onboard/core": "^2.7.0-alpha.3", + "@web3-onboard/core": "^2.7.0-alpha.4", "@web3-onboard/common": "^2.1.8-alpha.1", "use-sync-external-store": "1.0.0" }, diff --git a/packages/vue/package.json b/packages/vue/package.json index ab2210897..0ace33408 100644 --- a/packages/vue/package.json +++ b/packages/vue/package.json @@ -63,7 +63,7 @@ "@vueuse/core": "^8.4.2", "@vueuse/rxjs": "^8.2.0", "@web3-onboard/common": "^2.1.8-alpha.1", - "@web3-onboard/core": "^2.7.0-alpha.3", + "@web3-onboard/core": "^2.7.0-alpha.4", "vue-demi": "^0.12.4" }, "peerDependencies": {