OSDN Git Service

fix: update 2.0
[bytom/Byone.git] / src / models / wallet.js
index 4fc798c..41dfc11 100644 (file)
@@ -3,25 +3,16 @@ import bytom from './bytom'
 import { networks } from '../utils/constants'
 
 export const wallet = new Wallet({
-  url: {
-    bytom: networks.testnet,
-    bytom1: networks.mainnet,
-    vapor: networks.mainnet
-  },
+  net: 'testnet',
   chain: 'bytom'
 })
 
-export function setNet (net) {
-  wallet.setOptions({
-    url: {
-      bytom: networks.testnet,
-      bytom1: networks[net],
-      vapor: networks[net]
-    }
-  })
+export function setNet(net) {
+  // wallet.setNet(net)
 }
 
-export function setChain (chain) {
-  wallet.setOptions({ chain })
+export function setChain(chain) {
+  wallet.setChain(chain)
 }
 
+window.wallet = wallet