Skip to content

Commit

Permalink
Add InvalidChainId status prop
Browse files Browse the repository at this point in the history
  • Loading branch information
kamirr committed Sep 28, 2023
1 parent 8921202 commit 2db22ce
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
4 changes: 4 additions & 0 deletions model/src/payment/payment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ pub enum PaymentStatusProperty {
#[serde(rename = "neededTokenEst")]
needed_token_est: String,
},
InvalidChainId {
#[serde(rename = "chainId")]
chain_id: i64,
},
CantSign {
network: String,
address: String,
Expand Down
14 changes: 13 additions & 1 deletion specs/payment-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1297,6 +1297,10 @@ components:
Determines what property this is.
- InsufficientGas -- Driver cannot proceed due to missing gas.
- InsufficientToken -- Driver cannot proceed due to missing tokens.
- InvalidChainId -- A transaction can't be processed because its chain-id
isn't present in the configuration. This hints at a network being removed
from driver configuration after a transaction on this network has been
scheduled.
- CantSign -- Driver cannot sign transactions (locked wallet?).
- RpcError -- All configured RPC endpoints are failing.
- TxStuck -- Transaction was sent to blockchain successfully but cannot
Expand All @@ -1306,6 +1310,7 @@ components:
enum:
- InsufficientGas
- InsufficientToken
- InvalidChainId
- CantSign
- TxStuck
- RpcError
Expand All @@ -1314,6 +1319,8 @@ components:
Indicates which chain the problem occurs on. No statuses other than
CantSign necessarily imply issues on other chains than the one the status
property originates from.
Present for all status properties other than InvalidChainId.
type: string
neededGasEst:
description: >
Expand All @@ -1333,9 +1340,14 @@ components:
Only present for CantSign.
type: string
chainId:
description: >
Chain-id that the error relates to.
Only present for InvalidChainId.
type: integer
required:
- kind
- network

AgreementPayment:
description: >
Expand Down

0 comments on commit 2db22ce

Please sign in to comment.