Skip to content

Commit

Permalink
fix: keep opts optional
Browse files Browse the repository at this point in the history
  • Loading branch information
coolaj86 committed Apr 27, 2024
1 parent 70e330a commit 9a46603
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions dashkeys.js
Original file line number Diff line number Diff line change
Expand Up @@ -973,8 +973,6 @@ var DashKeys = ("object" === typeof module && exports) || {};

/** @type {DecodeBase58Check} */
_DashKeys.decode = async function (keyB58c, opts) {
console.log("################ found it!");

let _opts = {};
if (opts?.version) {
switch (opts.version) {
Expand Down Expand Up @@ -1035,7 +1033,7 @@ var DashKeys = ("object" === typeof module && exports) || {};
throw new Error(`unknown version ${opts.version}`);
}
}
if (opts.versions) {
if (opts?.versions) {
Object.assign(_opts, opts);
}
let parts = await dash58check.decode(keyB58c, _opts);
Expand Down

0 comments on commit 9a46603

Please sign in to comment.