Skip to content

Commit

Permalink
fix: starknet transaction status.
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhangguiguang committed Jan 8, 2024
1 parent 38a4e8b commit 945579f
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion core/starknet/chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,17 @@ func (c *Chain) FetchTransactionStatus(hash string) base.TransactionStatus {
}
if receipt.GetExecutionStatus() == rpc.TxnExecutionStatusREVERTED {
return base.TransactionStatusFailure
} else {
}
switch receipt.(type) {
case rpc.InvokeTransactionReceipt,
rpc.DeclareTransactionReceipt,
rpc.DeployTransactionReceipt,
rpc.DeployAccountTransactionReceipt,
rpc.L1HandlerTransactionReceipt:
// all subclass of CommonTransactionReceipt
return base.TransactionStatusSuccess
default:
return base.TransactionStatusPending
}
}

Expand Down

0 comments on commit 945579f

Please sign in to comment.