Closed PavelInjective closed 2 weeks ago
The pull request introduces several modifications primarily focused on error handling in the SyncBroadcastSignedTx
and broadcastTx
methods of the chainClient
struct. Additionally, it transitions the chain_test.go
file to chain_test
for testing purposes, updates the OFAC-related functionality in ofac.go
, and introduces a new test suite for OFAC checks in ofac_test.go
. A new JSON file, ofac.json
, containing Ethereum addresses, is also added.
File | Change Summary |
---|---|
client/chain/chain.go | Updated error handling in SyncBroadcastSignedTx and broadcastTx methods to check res.TxResponse.Code . |
client/chain/chain_test.go | Transitioned to chain_test package; modified imports and retained some tests while removing OFAC-related tests. |
client/chain/ofac.go | Updated naming conventions and added new constants; modified methods to incorporate new naming. |
client/chain/ofac_test.go | Introduced a new test suite for OFAC functionality with setup, teardown, and test methods. |
injective_data/ofac.json | Added a new JSON file containing an array of Ethereum addresses. |
ofacChecker
to the chainClient
struct, which is relevant to the modifications in the main PR that also involve error handling related to transaction broadcasting, ensuring compliance with OFAC regulations.ofacChecker
and modifies the NewChainClient
function to include OFAC checks, which aligns with the error handling updates in the main PR.SyncBroadcastSignedTx
and broadcastTx
methods, which are also the focus of the main PR, enhancing error handling during transaction broadcasting.SyncBroadcastSignedTx
and broadcastTx
methods, reinforcing the changes made in the main PR regarding error handling for transaction responses.ofac.go
file, which is related to the OFAC functionality discussed in the main PR, ensuring that the OFAC list file path is relative, thus enhancing the overall compliance checks.🐇 In the code where bunnies play,
Errors caught, they won't stray.
OFAC checks now stand so tall,
With tests in place, we won't fall.
Hopping through the lines so bright,
Our changes make the code just right! 🌟
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Summary by CodeRabbit
New Features
Bug Fixes
Documentation
Tests