wallet-core: fix withdrawTestBalance command
This commit is contained in:
parent
676ae5102b
commit
962bfde214
@ -1166,7 +1166,7 @@ export interface WithdrawTestBalanceRequest {
|
|||||||
/**
|
/**
|
||||||
* Bank access API base URL. Defaults to the bankBaseUrl.
|
* Bank access API base URL. Defaults to the bankBaseUrl.
|
||||||
*/
|
*/
|
||||||
bankAccessApiBaseUrl: string;
|
bankAccessApiBaseUrl?: string;
|
||||||
exchangeBaseUrl: string;
|
exchangeBaseUrl: string;
|
||||||
forcedDenomSel?: ForcedDenomSel;
|
forcedDenomSel?: ForcedDenomSel;
|
||||||
}
|
}
|
||||||
@ -1245,7 +1245,7 @@ export const codecForWithdrawTestBalance =
|
|||||||
.property("bankBaseUrl", codecForString())
|
.property("bankBaseUrl", codecForString())
|
||||||
.property("exchangeBaseUrl", codecForString())
|
.property("exchangeBaseUrl", codecForString())
|
||||||
.property("forcedDenomSel", codecForAny())
|
.property("forcedDenomSel", codecForAny())
|
||||||
.property("bankAccessApiBaseUrl", codecForString())
|
.property("bankAccessApiBaseUrl", codecOptional(codecForString()))
|
||||||
.build("WithdrawTestBalanceRequest");
|
.build("WithdrawTestBalanceRequest");
|
||||||
|
|
||||||
export interface ApplyRefundResponse {
|
export interface ApplyRefundResponse {
|
||||||
|
@ -92,19 +92,17 @@ export async function withdrawTestBalance(
|
|||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
const amount = req.amount;
|
const amount = req.amount;
|
||||||
const exchangeBaseUrl = req.exchangeBaseUrl;
|
const exchangeBaseUrl = req.exchangeBaseUrl;
|
||||||
|
const bankAccessApiBaseUrl = req.bankAccessApiBaseUrl ?? req.bankBaseUrl;
|
||||||
|
|
||||||
logger.trace(
|
logger.trace(
|
||||||
`Registered bank user, bank access base url ${req.bankAccessApiBaseUrl}`,
|
`Registered bank user, bank access base url ${bankAccessApiBaseUrl}`,
|
||||||
);
|
|
||||||
const bankUser = await registerRandomBankUser(
|
|
||||||
ws.http,
|
|
||||||
req.bankAccessApiBaseUrl,
|
|
||||||
);
|
);
|
||||||
|
const bankUser = await registerRandomBankUser(ws.http, bankAccessApiBaseUrl);
|
||||||
logger.trace(`Registered bank user ${JSON.stringify(bankUser)}`);
|
logger.trace(`Registered bank user ${JSON.stringify(bankUser)}`);
|
||||||
|
|
||||||
const wresp = await createDemoBankWithdrawalUri(
|
const wresp = await createDemoBankWithdrawalUri(
|
||||||
ws.http,
|
ws.http,
|
||||||
req.bankAccessApiBaseUrl,
|
bankAccessApiBaseUrl,
|
||||||
bankUser,
|
bankUser,
|
||||||
amount,
|
amount,
|
||||||
);
|
);
|
||||||
@ -117,7 +115,7 @@ export async function withdrawTestBalance(
|
|||||||
|
|
||||||
await confirmBankWithdrawalUri(
|
await confirmBankWithdrawalUri(
|
||||||
ws.http,
|
ws.http,
|
||||||
req.bankAccessApiBaseUrl,
|
bankAccessApiBaseUrl,
|
||||||
bankUser,
|
bankUser,
|
||||||
wresp.withdrawal_id,
|
wresp.withdrawal_id,
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user