-comments
This commit is contained in:
parent
99f27aaecd
commit
8b83f729d7
@ -1222,3 +1222,5 @@ export async function initiatePeerPullPayment(
|
|||||||
),
|
),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1361,13 +1361,20 @@ export async function abortTransaction(
|
|||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
const { type, args: rest } = parseId("txn", transactionId);
|
const { type, args: rest } = parseId("txn", transactionId);
|
||||||
|
|
||||||
if (type === TransactionType.Payment) {
|
switch (type) {
|
||||||
const proposalId = rest[0];
|
case TransactionType.Payment: {
|
||||||
await abortPay(ws, proposalId, forceImmediateAbort);
|
const proposalId = rest[0];
|
||||||
} else {
|
await abortPay(ws, proposalId, forceImmediateAbort);
|
||||||
const unknownTxType: any = type;
|
break;
|
||||||
throw Error(
|
}
|
||||||
`can't abort a '${unknownTxType}' transaction: not yet implemented`,
|
case TransactionType.PeerPushDebit: {
|
||||||
);
|
break;
|
||||||
|
}
|
||||||
|
default: {
|
||||||
|
const unknownTxType: any = type;
|
||||||
|
throw Error(
|
||||||
|
`can't abort a '${unknownTxType}' transaction: not yet implemented`,
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -591,8 +591,9 @@ export type ExportBackupPlainOp = {
|
|||||||
// group: Peer Payments
|
// group: Peer Payments
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if initiating a peer push payment is possible.
|
* Check if initiating a peer push payment is possible
|
||||||
*
|
* based on the funds in the wallet.
|
||||||
|
*
|
||||||
* FIXME: Rename to CheckPeerPushPaymentInitiation
|
* FIXME: Rename to CheckPeerPushPaymentInitiation
|
||||||
*/
|
*/
|
||||||
export type PreparePeerPushPaymentOp = {
|
export type PreparePeerPushPaymentOp = {
|
||||||
@ -612,6 +613,8 @@ export type InitiatePeerPushPaymentOp = {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Check an incoming peer push payment.
|
* Check an incoming peer push payment.
|
||||||
|
*
|
||||||
|
* FIXME: Rename to "PrepareIncomingPeerPushPayment"
|
||||||
*/
|
*/
|
||||||
export type CheckPeerPushPaymentOp = {
|
export type CheckPeerPushPaymentOp = {
|
||||||
op: WalletApiOperation.CheckPeerPushPayment;
|
op: WalletApiOperation.CheckPeerPushPayment;
|
||||||
@ -630,6 +633,8 @@ export type AcceptPeerPushPaymentOp = {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Initiate an outgoing peer pull payment.
|
* Initiate an outgoing peer pull payment.
|
||||||
|
*
|
||||||
|
* FIXME: This does not check anything, so rename to CheckPeerPullPaymentInitiation
|
||||||
*/
|
*/
|
||||||
export type PreparePeerPullPaymentOp = {
|
export type PreparePeerPullPaymentOp = {
|
||||||
op: WalletApiOperation.PreparePeerPullPayment;
|
op: WalletApiOperation.PreparePeerPullPayment;
|
||||||
@ -648,6 +653,8 @@ export type InitiatePeerPullPaymentOp = {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Prepare for an incoming peer pull payment.
|
* Prepare for an incoming peer pull payment.
|
||||||
|
*
|
||||||
|
* FIXME: Rename to "PreparePeerPullPayment"
|
||||||
*/
|
*/
|
||||||
export type CheckPeerPullPaymentOp = {
|
export type CheckPeerPullPaymentOp = {
|
||||||
op: WalletApiOperation.CheckPeerPullPayment;
|
op: WalletApiOperation.CheckPeerPullPayment;
|
||||||
@ -656,7 +663,9 @@ export type CheckPeerPullPaymentOp = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Accept an incoming peer pull payment.
|
* Accept an incoming peer pull payment (i.e. pay the other party).
|
||||||
|
*
|
||||||
|
* FIXME: Rename to ConfirmPeerPullPayment
|
||||||
*/
|
*/
|
||||||
export type AcceptPeerPullPaymentOp = {
|
export type AcceptPeerPullPaymentOp = {
|
||||||
op: WalletApiOperation.AcceptPeerPullPayment;
|
op: WalletApiOperation.AcceptPeerPullPayment;
|
||||||
|
Loading…
Reference in New Issue
Block a user