@rabby-wallet/eth-coinbase-keyring
Advanced tools
Comparing version 0.0.0-beta.0 to 0.0.0-beta.1
@@ -172,2 +172,3 @@ "use strict"; | ||
__classPrivateFieldGet(this, _CoinbaseKeyring_instances, "m", _CoinbaseKeyring_emit).call(this, sessionData, 'ACCOUNT_ERROR'); | ||
provider.disconnect(); | ||
return; | ||
@@ -185,5 +186,5 @@ } | ||
const sessionData = __classPrivateFieldGet(this, _CoinbaseKeyring_sessions, "f")[relay.session.id]; | ||
if (sessionData) { | ||
if (sessionData === null || sessionData === void 0 ? void 0 : sessionData.account) { | ||
sessionData.chainId = chainId; | ||
__classPrivateFieldGet(this, _CoinbaseKeyring_instances, "m", _CoinbaseKeyring_emit).call(this, sessionData, 'CONNECTED'); | ||
__classPrivateFieldGet(this, _CoinbaseKeyring_instances, "m", _CoinbaseKeyring_emit).call(this, sessionData, 'ACCOUNT_CHANGED'); | ||
} | ||
@@ -198,9 +199,2 @@ }); | ||
}) | ||
.then((accounts) => { | ||
const sessionData = __classPrivateFieldGet(this, _CoinbaseKeyring_sessions, "f")[relay.session.id]; | ||
if (sessionData) { | ||
sessionData.account = accounts[0]; | ||
__classPrivateFieldGet(this, _CoinbaseKeyring_instances, "m", _CoinbaseKeyring_emit).call(this, sessionData, 'CONNECTED'); | ||
} | ||
}) | ||
.catch((error) => { | ||
@@ -227,2 +221,6 @@ console.error(error); | ||
sessionData.provider.disconnect(); | ||
sessionData.status = 'DISCONNECTED'; | ||
if (!silent) { | ||
__classPrivateFieldGet(this, _CoinbaseKeyring_instances, "m", _CoinbaseKeyring_emit).call(this, sessionData, 'DISCONNECTED'); | ||
} | ||
} | ||
@@ -233,5 +231,4 @@ } | ||
_CoinbaseKeyring_accounts = new WeakMap(), _CoinbaseKeyring_sessions = new WeakMap(), _CoinbaseKeyring_instances = new WeakSet(), _CoinbaseKeyring_initRelay = function _CoinbaseKeyring_initRelay(opts) { | ||
var _a; | ||
const relayEventManager = new WalletSDKRelayEventManager_1.WalletSDKRelayEventManager(); | ||
const id = (_a = opts === null || opts === void 0 ? void 0 : opts.address) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(); | ||
const id = (0, uuid_1.v4)(); | ||
const storage = new storage_1.MemoryStorage(`coinbase:${id}`); | ||
@@ -238,0 +235,0 @@ const defaultRelayOptions = { |
{ | ||
"name": "@rabby-wallet/eth-coinbase-keyring", | ||
"version": "0.0.0-beta.0", | ||
"version": "0.0.0-beta.1", | ||
"description": "A keyring that uses the Coinbase Wallet SDK to sign transactions", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
58716
447