最后更新于21天前
On a NETWORK_CHANGED event, the user has changed the network their provider wallet is connected to. The event will return the updated network details.
neoline.addEventListener(neoline.EVENT.NETWORK_CHANGED, (result) => { console.log('network:', result); }); /* Another */ window.addEventListener('NEOLine.NEO.EVENT.NETWORK_CHANGED', (result) => { console.log('network:', result.detail); });
networks: string[]
A list of all networks which this wallet provider allows access to
chainId: number
chainId:
number
chainId the wallet is currently set to
defaultNetwork: string
Network the wallet is currently set to