Fix default options merging in LaunchpadLedger constructor

This commit is contained in:
bartmacbartek
2021-05-06 13:41:44 +02:00
parent 71a1df7aa7
commit 84ee121601
+4 -7
View File
@@ -44,13 +44,10 @@ export class LaunchpadLedger {
prefix: cosmosBech32Prefix,
testModeAllowed: false,
};
const { hdPaths, prefix, testModeAllowed } = {
...defaultOptions,
...options,
};
this.testModeAllowed = testModeAllowed;
this.hdPaths = hdPaths;
this.prefix = prefix;
this.testModeAllowed = options.testModeAllowed ?? defaultOptions.testModeAllowed;
this.hdPaths = options.hdPaths ?? defaultOptions.hdPaths;
this.prefix = options.prefix ?? cosmosBech32Prefix;
this.app = new CosmosApp(transport);
}