wallet-core: use string amounts for deposit response

This commit is contained in:
Florian Dold 2022-10-31 17:08:42 +01:00
parent 780eb20227
commit 78b4ab19a3
No known key found for this signature in database
GPG Key ID: D2E4F00F29D02A4B
2 changed files with 6 additions and 3 deletions

View File

@ -1643,8 +1643,8 @@ export const codecForPrepareDepositRequest = (): Codec<PrepareDepositRequest> =>
.build("PrepareDepositRequest"); .build("PrepareDepositRequest");
export interface PrepareDepositResponse { export interface PrepareDepositResponse {
totalDepositCost: AmountJson; totalDepositCost: AmountString;
effectiveDepositAmount: AmountJson; effectiveDepositAmount: AmountString;
} }
export const codecForCreateDepositGroupRequest = export const codecForCreateDepositGroupRequest =

View File

@ -367,7 +367,10 @@ export async function prepareDepositGroup(
payCoinSel, payCoinSel,
); );
return { totalDepositCost, effectiveDepositAmount }; return {
totalDepositCost: Amounts.stringify(totalDepositCost),
effectiveDepositAmount: Amounts.stringify(effectiveDepositAmount),
};
} }
export async function createDepositGroup( export async function createDepositGroup(
ws: InternalWalletState, ws: InternalWalletState,