Socket
Socket
Sign inDemoInstall

@keplr-wallet/common

Package Overview
Dependencies
Maintainers
1
Versions
553
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@keplr-wallet/common - npm Package Compare versions

Comparing version 0.12.73 to 0.12.74-rc.0

build/mnemonic/index.d.ts

15

build/denom/index.js

@@ -21,9 +21,12 @@ "use strict";

this._denom = _denom;
// Remember that the coin's actual denom should start with "type:contractAddress:denom" if it is for the token based on contract.
const split = this.denom.split(/(\w+):(\w+):(.+)/).filter(Boolean);
if (split.length !== 1 && split.length !== 3) {
throw new Error(`Invalid denom: ${this.denom}`);
// Remember that the coin's actual denom should start with "type:contractAddress" or "type:contractAddress:symbol" if it is for the token based on contract.
let split = this.denom.split(/^(\w+):(\w+)$/).filter(Boolean);
if (split.length !== 2) {
split = this.denom.split(/^(\w+):(\w+):(.+)$/).filter(Boolean);
if (split.length !== 1 && split.length !== 3) {
throw new Error(`Invalid denom: ${this.denom}`);
}
}
this._type = split.length === 3 ? split[0] : "";
this._contractAddress = split.length === 3 ? split[1] : "";
this._type = split.length >= 2 ? split[0] : "";
this._contractAddress = split.length >= 2 ? split[1] : "";
}

@@ -30,0 +33,0 @@ get denom() {

1

build/index.d.ts

@@ -10,1 +10,2 @@ export * from "./kv-store";

export * from "./sleep";
export * from "./mnemonic";

@@ -26,2 +26,3 @@ "use strict";

__exportStar(require("./sleep"), exports);
__exportStar(require("./mnemonic"), exports);
//# sourceMappingURL=index.js.map
{
"name": "@keplr-wallet/common",
"version": "0.12.73",
"version": "0.12.74-rc.0",
"main": "build/index.js",

@@ -19,4 +19,4 @@ "author": "chainapsis",

"dependencies": {
"@keplr-wallet/crypto": "0.12.73",
"@keplr-wallet/types": "0.12.73",
"@keplr-wallet/crypto": "0.12.74-rc.0",
"@keplr-wallet/types": "0.12.74-rc.0",
"buffer": "^6.0.3",

@@ -26,3 +26,3 @@ "delay": "^4.4.0",

},
"gitHead": "47f4e5a707c42a6acd2f14f907856394defc0d7e"
"gitHead": "0c51234ac4592890617042ac5416548e9fe54920"
}

@@ -32,10 +32,13 @@ import { Buffer } from "buffer/";

constructor(protected readonly _denom: string) {
// Remember that the coin's actual denom should start with "type:contractAddress:denom" if it is for the token based on contract.
const split = this.denom.split(/(\w+):(\w+):(.+)/).filter(Boolean);
if (split.length !== 1 && split.length !== 3) {
throw new Error(`Invalid denom: ${this.denom}`);
// Remember that the coin's actual denom should start with "type:contractAddress" or "type:contractAddress:symbol" if it is for the token based on contract.
let split = this.denom.split(/^(\w+):(\w+)$/).filter(Boolean);
if (split.length !== 2) {
split = this.denom.split(/^(\w+):(\w+):(.+)$/).filter(Boolean);
if (split.length !== 1 && split.length !== 3) {
throw new Error(`Invalid denom: ${this.denom}`);
}
}
this._type = split.length === 3 ? split[0] : "";
this._contractAddress = split.length === 3 ? split[1] : "";
this._type = split.length >= 2 ? split[0] : "";
this._contractAddress = split.length >= 2 ? split[1] : "";
}

@@ -42,0 +45,0 @@

@@ -10,1 +10,2 @@ export * from "./kv-store";

export * from "./sleep";
export * from "./mnemonic";

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc