Fix default options merging in LaunchpadLedger constructor
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user