Network Change Event

This method is used to register the callback function for the network change event.

Example:

If you test with our partner network, you need to change 'Testnet' to url 'https://partner.m-safe.io'.

See example in Integration test.

onChangeAccount
import { MSafeWallet } from "msafe-wallet";

const msafe = await MSafeWallet.new();
msafe.onChangeAccount((network:string)=>{
    console.log("network change to:", network)
});

Last updated