scatterjs-core
Advanced tools
Comparing version 2.7.17 to 2.7.18
@@ -1,1 +0,1 @@ | ||
"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.WALLET_METHODS=void 0;var _ALTERNATES,_classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")),_createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass")),_defineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/defineProperty")),WALLET_METHODS={disconnect:"disconnect",isConnected:"isConnected",isPaired:"isPaired",addEventHandler:"addEventHandler",removeEventHandler:"removeEventHandler",listen:"listen",getVersion:"getVersion",getIdentity:"getIdentity",getIdentityFromPermissions:"getIdentityFromPermissions",forgetIdentity:"forgetIdentity",updateIdentity:"updateIdentity",authenticate:"authenticate",getArbitrarySignature:"getArbitrarySignature",getPublicKey:"getPublicKey",linkAccount:"linkAccount",hasAccountFor:"hasAccountFor",suggestNetwork:"suggestNetwork",requestTransfer:"requestTransfer",requestSignature:"requestSignature",createTransaction:"createTransaction",addToken:"addToken"};exports.WALLET_METHODS=WALLET_METHODS;var ALTERNATES=(_ALTERNATES={},(0,_defineProperty2.default)(_ALTERNATES,WALLET_METHODS.getIdentity,"login"),(0,_defineProperty2.default)(_ALTERNATES,WALLET_METHODS.forgetIdentity,"logout"),(0,_defineProperty2.default)(_ALTERNATES,WALLET_METHODS.getIdentityFromPermissions,"checkLogin"),_ALTERNATES),WalletInterface=/*#__PURE__*/function(){function a(b,c,d){(0,_classCallCheck2.default)(this,a);var e=function(a){return function(){throw new Error("".concat(b," does not support the ").concat(a," method."))}},f=function(a,b){"undefined"==typeof d[b]&&(d[b]=a?a:e(b)),ALTERNATES[b]&&"undefined"==typeof d[ALTERNATES[b]]&&(d[ALTERNATES[b]]=d[b]?d[b]:e(b))};Object.keys(WALLET_METHODS).map(function(a){return f(c[a],a)})}return(0,_createClass2.default)(a,null,[{key:"bindBasics",value:function b(a){a.account=function(b){return a.identity?a.identity.accounts?a.identity.accounts.find(function(a){return a.blockchain===b}):void 0:void 0}}}]),a}();exports.default=WalletInterface; | ||
"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.WALLET_METHODS=void 0;var _ALTERNATES,_classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")),_createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass")),_defineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/defineProperty")),WALLET_METHODS={disconnect:"disconnect",isConnected:"isConnected",isPaired:"isPaired",addEventHandler:"addEventHandler",removeEventHandler:"removeEventHandler",listen:"listen",getVersion:"getVersion",getIdentity:"getIdentity",getIdentityFromPermissions:"getIdentityFromPermissions",forgetIdentity:"forgetIdentity",updateIdentity:"updateIdentity",authenticate:"authenticate",getArbitrarySignature:"getArbitrarySignature",getPublicKey:"getPublicKey",linkAccount:"linkAccount",hasAccountFor:"hasAccountFor",suggestNetwork:"suggestNetwork",requestTransfer:"requestTransfer",requestSignature:"requestSignature",createTransaction:"createTransaction",addToken:"addToken"};exports.WALLET_METHODS=WALLET_METHODS;var ALTERNATES=(_ALTERNATES={},(0,_defineProperty2.default)(_ALTERNATES,WALLET_METHODS.getIdentity,"login"),(0,_defineProperty2.default)(_ALTERNATES,WALLET_METHODS.forgetIdentity,"logout"),(0,_defineProperty2.default)(_ALTERNATES,WALLET_METHODS.getIdentityFromPermissions,"checkLogin"),_ALTERNATES),WalletInterface=/*#__PURE__*/function(){function a(b,c,d){(0,_classCallCheck2.default)(this,a);var e=function(a){return function(){throw console.error("".concat(b," does not support the ").concat(a," method.")),new Error("".concat(b," does not support the ").concat(a," method."))}},f=function(a,b){"undefined"==typeof d[b]&&(d[b]=a?a:e(b)),ALTERNATES[b]&&"undefined"==typeof d[ALTERNATES[b]]&&(d[ALTERNATES[b]]=d[b]?d[b]:e(b))};Object.keys(WALLET_METHODS).map(function(a){return f(c[a],a)})}return(0,_createClass2.default)(a,null,[{key:"bindBasics",value:function b(a){a.account=function(b){return a.identity?a.identity.accounts?a.identity.accounts.find(function(a){return a.blockchain===b}):void 0:void 0}}}]),a}();exports.default=WalletInterface; |
{ | ||
"name": "scatterjs-core", | ||
"version": "2.7.17", | ||
"version": "2.7.18", | ||
"main": "dist/index.js", | ||
@@ -13,3 +13,3 @@ "license": "MIT", | ||
}, | ||
"gitHead": "81469083eb6527ecb71413888d3c8ec8cfc5ae8c" | ||
"gitHead": "6ce5e6812212b8936f96aa2ffad412e5cbb463d7" | ||
} |
@@ -36,3 +36,6 @@ export const WALLET_METHODS = { | ||
constructor(identifier, methods, context){ | ||
const unavailable = method => () => { throw new Error(`${identifier} does not support the ${method} method.`); }; | ||
const unavailable = method => () => { | ||
console.error(`${identifier} does not support the ${method} method.`); | ||
throw new Error(`${identifier} does not support the ${method} method.`); | ||
}; | ||
@@ -39,0 +42,0 @@ const bindToContext = (method, key) => { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
72062
918