aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/operations/pay-peer-common.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2023-06-19 12:02:43 +0200
committerFlorian Dold <florian@dold.me>2023-06-19 12:02:43 +0200
commitbcff03949b40d0d37069bdb7af941061e367a093 (patch)
tree2c39d704d1400a35443df95eb84dc99df8094c39 /packages/taler-wallet-core/src/operations/pay-peer-common.ts
parented01d407e7e224960337614385676dcf1ae6ca8d (diff)
downloadwallet-core-bcff03949b40d0d37069bdb7af941061e367a093.tar.xz
wallet-core: implement coin selection repair for p2p payments
Diffstat (limited to 'packages/taler-wallet-core/src/operations/pay-peer-common.ts')
-rw-r--r--packages/taler-wallet-core/src/operations/pay-peer-common.ts12
1 files changed, 7 insertions, 5 deletions
diff --git a/packages/taler-wallet-core/src/operations/pay-peer-common.ts b/packages/taler-wallet-core/src/operations/pay-peer-common.ts
index 72e48cb03..4856fbe36 100644
--- a/packages/taler-wallet-core/src/operations/pay-peer-common.ts
+++ b/packages/taler-wallet-core/src/operations/pay-peer-common.ts
@@ -158,6 +158,12 @@ export async function queryCoinInfosForSelection(
return infos;
}
+export interface PeerCoinRepair {
+ exchangeBaseUrl: string;
+ coinPubs: CoinPublicKeyString[];
+ contribs: AmountJson[];
+}
+
export interface PeerCoinSelectionRequest {
instructedAmount: AmountJson;
@@ -165,11 +171,7 @@ export interface PeerCoinSelectionRequest {
* Instruct the coin selection to repair this coin
* selection instead of selecting completely new coins.
*/
- repair?: {
- exchangeBaseUrl: string;
- coinPubs: CoinPublicKeyString[];
- contribs: AmountJson[];
- };
+ repair?: PeerCoinRepair;
}
export async function selectPeerCoins(