diff --git a/model/src/payment/payment.rs b/model/src/payment/payment.rs index 97af8c1b..6017214f 100644 --- a/model/src/payment/payment.rs +++ b/model/src/payment/payment.rs @@ -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, diff --git a/specs/payment-api.yaml b/specs/payment-api.yaml index da538384..d95cc9f5 100644 --- a/specs/payment-api.yaml +++ b/specs/payment-api.yaml @@ -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 @@ -1306,6 +1310,7 @@ components: enum: - InsufficientGas - InsufficientToken + - InvalidChainId - CantSign - TxStuck - RpcError @@ -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: > @@ -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: >