@tronweb3/tronwallet-abstract-adapter
Advanced tools
Comparing version 1.1.4 to 1.1.5
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.WalletSwitchChainError = exports.WalletWindowClosedError = exports.WalletWalletLoadError = exports.WalletSignTransactionError = exports.WalletSignMessageError = exports.WalletDisconnectionError = exports.WalletConnectionError = exports.WalletDisconnectedError = exports.WalletNotSelectedError = exports.WalletNotFoundError = exports.WalletError = void 0; | ||
exports.WalletGetNetworkError = exports.WalletSwitchChainError = exports.WalletWindowClosedError = exports.WalletWalletLoadError = exports.WalletSignTransactionError = exports.WalletSignMessageError = exports.WalletDisconnectionError = exports.WalletConnectionError = exports.WalletDisconnectedError = exports.WalletNotSelectedError = exports.WalletNotFoundError = exports.WalletError = void 0; | ||
class WalletError extends Error { | ||
@@ -116,2 +116,12 @@ constructor(message, error) { | ||
exports.WalletSwitchChainError = WalletSwitchChainError; | ||
/** | ||
* Occurs when get network infomation. | ||
*/ | ||
class WalletGetNetworkError extends WalletError { | ||
constructor() { | ||
super(...arguments); | ||
this.name = 'WalletGetNetworkError'; | ||
} | ||
} | ||
exports.WalletGetNetworkError = WalletGetNetworkError; | ||
//# sourceMappingURL=errors.js.map |
@@ -50,5 +50,6 @@ "use strict"; | ||
function isInMobileBrowser() { | ||
return navigator.userAgent.match(/Android|webOS|iPhone|iPad|iPod|BlackBerry|Windows Phone/i); | ||
return (typeof navigator !== 'undefined' && | ||
navigator.userAgent.match(/Android|webOS|iPhone|iPad|iPod|BlackBerry|Windows Phone/i)); | ||
} | ||
exports.isInMobileBrowser = isInMobileBrowser; | ||
//# sourceMappingURL=utils.js.map |
@@ -102,2 +102,11 @@ export class WalletError extends Error { | ||
} | ||
/** | ||
* Occurs when get network infomation. | ||
*/ | ||
export class WalletGetNetworkError extends WalletError { | ||
constructor() { | ||
super(...arguments); | ||
this.name = 'WalletGetNetworkError'; | ||
} | ||
} | ||
//# sourceMappingURL=errors.js.map |
@@ -45,4 +45,5 @@ /** | ||
export function isInMobileBrowser() { | ||
return navigator.userAgent.match(/Android|webOS|iPhone|iPad|iPod|BlackBerry|Windows Phone/i); | ||
return (typeof navigator !== 'undefined' && | ||
navigator.userAgent.match(/Android|webOS|iPhone|iPad|iPod|BlackBerry|Windows Phone/i)); | ||
} | ||
//# sourceMappingURL=utils.js.map |
@@ -70,2 +70,8 @@ export declare class WalletError extends Error { | ||
} | ||
/** | ||
* Occurs when get network infomation. | ||
*/ | ||
export declare class WalletGetNetworkError extends WalletError { | ||
name: string; | ||
} | ||
//# sourceMappingURL=errors.d.ts.map |
@@ -15,3 +15,3 @@ /** | ||
*/ | ||
export declare function isInMobileBrowser(): RegExpMatchArray | null; | ||
export declare function isInMobileBrowser(): false | RegExpMatchArray | null; | ||
//# sourceMappingURL=utils.d.ts.map |
{ | ||
"name": "@tronweb3/tronwallet-abstract-adapter", | ||
"version": "1.1.4", | ||
"version": "1.1.5", | ||
"description": "Abstract interface definition of Tron Wallet Adapters.", | ||
@@ -5,0 +5,0 @@ "author": "tronprotocol", |
@@ -83,1 +83,7 @@ export class WalletError extends Error { | ||
} | ||
/** | ||
* Occurs when get network infomation. | ||
*/ | ||
export class WalletGetNetworkError extends WalletError { | ||
name = 'WalletGetNetworkError'; | ||
} |
@@ -51,3 +51,6 @@ /** | ||
export function isInMobileBrowser() { | ||
return navigator.userAgent.match(/Android|webOS|iPhone|iPad|iPod|BlackBerry|Windows Phone/i); | ||
return ( | ||
typeof navigator !== 'undefined' && | ||
navigator.userAgent.match(/Android|webOS|iPhone|iPad|iPod|BlackBerry|Windows Phone/i) | ||
); | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
49869
1085