add allowHttp to the cli
This commit is contained in:
parent
205d7364ed
commit
4889ae9c9b
@ -190,6 +190,9 @@ export const walletCli = clk
|
|||||||
.flag("noThrottle", ["--no-throttle"], {
|
.flag("noThrottle", ["--no-throttle"], {
|
||||||
help: "Don't do any request throttling.",
|
help: "Don't do any request throttling.",
|
||||||
})
|
})
|
||||||
|
.flag("allowHttp", ["--allow-http"], {
|
||||||
|
help: "Allow unsafe http connections.",
|
||||||
|
})
|
||||||
.flag("version", ["-v", "--version"], {
|
.flag("version", ["-v", "--version"], {
|
||||||
onPresentHandler: printVersion,
|
onPresentHandler: printVersion,
|
||||||
})
|
})
|
||||||
@ -240,6 +243,7 @@ async function createLocalWallet(
|
|||||||
const dbPath = walletCliArgs.wallet.walletDbFile ?? defaultWalletDbPath;
|
const dbPath = walletCliArgs.wallet.walletDbFile ?? defaultWalletDbPath;
|
||||||
const myHttpLib = createPlatformHttpLib({
|
const myHttpLib = createPlatformHttpLib({
|
||||||
enableThrottling: walletCliArgs.wallet.noThrottle ? false : true,
|
enableThrottling: walletCliArgs.wallet.noThrottle ? false : true,
|
||||||
|
allowHttp: walletCliArgs.wallet.allowHttp ? true : false,
|
||||||
});
|
});
|
||||||
const wallet = await createNativeWalletHost({
|
const wallet = await createNativeWalletHost({
|
||||||
persistentStoragePath: dbPath !== ":memory:" ? dbPath : undefined,
|
persistentStoragePath: dbPath !== ":memory:" ? dbPath : undefined,
|
||||||
@ -1269,6 +1273,7 @@ advancedCli
|
|||||||
.action(async (args) => {
|
.action(async (args) => {
|
||||||
const myHttpLib = createPlatformHttpLib({
|
const myHttpLib = createPlatformHttpLib({
|
||||||
enableThrottling: false,
|
enableThrottling: false,
|
||||||
|
allowHttp: true,
|
||||||
});
|
});
|
||||||
const res = await createNativeWalletHost2({
|
const res = await createNativeWalletHost2({
|
||||||
// No persistent DB storage.
|
// No persistent DB storage.
|
||||||
|
Loading…
Reference in New Issue
Block a user