prettier
This commit is contained in:
parent
76fffdedd7
commit
06d9aab47c
@ -25,7 +25,11 @@ import * as clk from "./clk";
|
||||
import { BridgeIDBFactory } from "idb-bridge";
|
||||
import { Logger } from "../util/logging";
|
||||
import { Amounts } from "../util/amounts";
|
||||
import { decodeCrock, setupRefreshPlanchet, encodeCrock } from "../crypto/talerCrypto";
|
||||
import {
|
||||
decodeCrock,
|
||||
setupRefreshPlanchet,
|
||||
encodeCrock,
|
||||
} from "../crypto/talerCrypto";
|
||||
import { OperationFailedAndReportedError } from "../operations/errors";
|
||||
import { Bank } from "./bank";
|
||||
import { classifyTalerUri, TalerUriType } from "../util/taleruri";
|
||||
@ -368,7 +372,6 @@ advancedCli
|
||||
fs.writeFileSync(1, decodeCrock(enc.trim()));
|
||||
});
|
||||
|
||||
|
||||
advancedCli
|
||||
.subcommand("withdrawManually", "withdraw-manually", {
|
||||
help: "Withdraw manually from an exchange.",
|
||||
@ -381,7 +384,9 @@ advancedCli
|
||||
})
|
||||
.action(async (args) => {
|
||||
await withWallet(args, async (wallet) => {
|
||||
const exchange = await wallet.updateExchangeFromUrl(args.withdrawManually.exchange);
|
||||
const exchange = await wallet.updateExchangeFromUrl(
|
||||
args.withdrawManually.exchange,
|
||||
);
|
||||
const acct = exchange.wireInfo?.accounts[0];
|
||||
if (!acct) {
|
||||
console.log("exchange has no accounts");
|
||||
@ -572,13 +577,11 @@ const testCli = walletCli.subcommand("testingArgs", "testing", {
|
||||
help: "Subcommands for testing GNU Taler deployments.",
|
||||
});
|
||||
|
||||
testCli
|
||||
.subcommand("vectors", "vectors")
|
||||
.action(async (args) => {
|
||||
testCli.subcommand("vectors", "vectors").action(async (args) => {
|
||||
const secretSeed = nacl.randomBytes(64);
|
||||
const coinIndex = Math.ceil(Math.random() * 100)
|
||||
const coinIndex = Math.ceil(Math.random() * 100);
|
||||
const p = setupRefreshPlanchet(secretSeed, coinIndex);
|
||||
console.log("setupRefreshPlanchet")
|
||||
console.log("setupRefreshPlanchet");
|
||||
console.log(` (in) secret seed: ${encodeCrock(secretSeed)}`);
|
||||
console.log(` (in) coin index: ${coinIndex}`);
|
||||
console.log(` (out) blinding secret: ${encodeCrock(p.bks)}`);
|
||||
|
@ -25,7 +25,10 @@ const paytoPfx = "payto://";
|
||||
/**
|
||||
* Add query parameters to a payto URI
|
||||
*/
|
||||
export function addPaytoQueryParams(s: string, params: { [name: string]: string }): string {
|
||||
export function addPaytoQueryParams(
|
||||
s: string,
|
||||
params: { [name: string]: string },
|
||||
): string {
|
||||
const [acct, search] = s.slice(paytoPfx.length).split("?");
|
||||
const searchParams = new URLSearchParams(search || "");
|
||||
for (const k of Object.keys(params)) {
|
||||
|
Loading…
Reference in New Issue
Block a user