Skip to content

Latest commit

 

History

History
24 lines (14 loc) · 484 Bytes

File metadata and controls

24 lines (14 loc) · 484 Bytes

switchNetwork

Get network of current account

Method

async function switchNetwork(network: string): void

Params

the network. livenet and testnet

Example

const provider = (window.$onekey && window.$onekey.btc) || window.unisat;

async provider.switchNetwork("livenet");

Demo

{% embed url="https://codepen.io/OneKeyHQ/pen/ZEwMJKJ" %}