ACCOUNT_CHANGED

On a ACCOUNT_CHANGED event, the callback will fire with a single argument of the new account. This occurs when an account is already connected to the dapp, and the user has changed the connected account from the dapi provider side.

Parameter
Description

address: string

Address of the connected account

label: string

A label the users has set to identify their wallet

Example

neoline.addEventListener(neoline.EVENT.ACCOUNT_CHANGED, (result) => {
    console.log('account changed:', result);
});
/* Another */
window.addEventListener('NEOLine.NEO.EVENT.ACCOUNT_CHANGED', (result) => {
    console.log('account changed:', result.detail);
});

最后更新于