@web3modal/scaffold
Advanced tools
Comparing version 3.0.0-73ed03f2 to 3.0.0-7b021635
export * from './src/modal/w3m-account-button/index.js'; | ||
export * from './src/modal/w3m-button/index.js'; | ||
export * from './src/modal/w3m-connect-button/index.js'; | ||
@@ -3,0 +4,0 @@ export * from './src/modal/w3m-modal/index.js'; |
@@ -33,2 +33,9 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
} | ||
else { | ||
this.address = ''; | ||
this.balanceVal = ''; | ||
this.profileName = ''; | ||
this.profileImage = ''; | ||
this.balanceSymbol = ''; | ||
} | ||
}), | ||
@@ -35,0 +42,0 @@ NetworkController.subscribeKey('caipNetwork', val => (this.network = val)) |
@@ -7,3 +7,3 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
}; | ||
import { AssetController, ModalController, NetworkController } from '@web3modal/core'; | ||
import { AccountController, AssetController, ModalController, NetworkController } from '@web3modal/core'; | ||
import { LitElement, html } from 'lit'; | ||
@@ -16,6 +16,11 @@ import { customElement, property, state } from 'lit/decorators.js'; | ||
this.unsubscribe = []; | ||
this.variant = 'fill'; | ||
this.networkImages = AssetController.state.networkImages; | ||
this.variant = 'fill'; | ||
this.network = NetworkController.state.caipNetwork; | ||
this.unsubscribe.push(NetworkController.subscribeKey('caipNetwork', val => (this.network = val))); | ||
this.connected = AccountController.state.isConnected; | ||
this.unsubscribe.push(...[ | ||
NetworkController.subscribeKey('caipNetwork', val => (this.network = val)), | ||
AccountController.subscribeKey('isConnected', val => (this.connected = val)), | ||
AssetController.subscribeNetworkImages(val => (this.networkImages = { ...val })) | ||
]); | ||
} | ||
@@ -29,3 +34,3 @@ disconnectedCallback() { | ||
<wui-network-button imageSrc=${ifDefined(networkImage)} @click=${this.onClick.bind(this)}> | ||
${this.network?.name} | ||
${this.network?.name ?? (this.connected ? 'Unknown Network' : 'Select Network')} | ||
</wui-network-button> | ||
@@ -43,3 +48,9 @@ `; | ||
state() | ||
], W3mNetworkButton.prototype, "networkImages", void 0); | ||
__decorate([ | ||
state() | ||
], W3mNetworkButton.prototype, "network", void 0); | ||
__decorate([ | ||
state() | ||
], W3mNetworkButton.prototype, "connected", void 0); | ||
W3mNetworkButton = __decorate([ | ||
@@ -46,0 +57,0 @@ customElement('w3m-network-button') |
export * from './src/modal/w3m-account-button/index.js'; | ||
export * from './src/modal/w3m-button/index.js'; | ||
export * from './src/modal/w3m-connect-button/index.js'; | ||
@@ -3,0 +4,0 @@ export * from './src/modal/w3m-modal/index.js'; |
@@ -5,5 +5,6 @@ import type { WuiNetworkButton } from '@web3modal/ui'; | ||
private unsubscribe; | ||
private readonly networkImages; | ||
variant?: WuiNetworkButton['variant']; | ||
private networkImages; | ||
private network; | ||
private connected; | ||
constructor(); | ||
@@ -10,0 +11,0 @@ disconnectedCallback(): void; |
{ | ||
"name": "@web3modal/scaffold", | ||
"version": "3.0.0-73ed03f2", | ||
"version": "3.0.0-7b021635", | ||
"type": "module", | ||
@@ -18,6 +18,5 @@ "main": "./dist/esm/index.js", | ||
"dependencies": { | ||
"@web3modal/core": "3.0.0-73ed03f2", | ||
"@web3modal/ui": "3.0.0-73ed03f2", | ||
"lit": "2.8.0", | ||
"motion": "10.16.2" | ||
"@web3modal/core": "3.0.0-7b021635", | ||
"@web3modal/ui": "3.0.0-7b021635", | ||
"lit": "2.8.0" | ||
}, | ||
@@ -24,0 +23,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
316052
3
132
3347
+ Added@web3modal/core@3.0.0-7b021635(transitive)
+ Added@web3modal/ui@3.0.0-7b021635(transitive)
- Removedmotion@10.16.2
- Removed@web3modal/core@3.0.0-73ed03f2(transitive)
- Removed@web3modal/ui@3.0.0-73ed03f2(transitive)
Updated@web3modal/ui@3.0.0-7b021635