Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[EVM-757]: Some commands did not print out errors returned by tx relayer #1768

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions command/bridge/deposit/erc1155/deposit_erc1155.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ func runCommand(cmd *cobra.Command, _ []string) {

receipt, err := txRelayer.SendTransaction(mintTxn, minterKey)
if err != nil {
outputter.SetError(fmt.Errorf("failed to send mint transaction to depositor %s", depositorAddr))
outputter.SetError(fmt.Errorf("failed to send mint transaction to depositor %s: %w", depositorAddr, err))

return
}
Expand All @@ -171,7 +171,7 @@ func runCommand(cmd *cobra.Command, _ []string) {

receipt, err := txRelayer.SendTransaction(approveTxn, depositorKey)
if err != nil {
outputter.SetError(fmt.Errorf("failed to send root erc 1155 approve transaction"))
outputter.SetError(fmt.Errorf("failed to send root erc 1155 approve transaction: %w", err))

return
}
Expand Down
4 changes: 2 additions & 2 deletions command/bridge/deposit/erc20/deposit_erc20.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ func runCommand(cmd *cobra.Command, _ []string) {

receipt, err := txRelayer.SendTransaction(mintTxn, minterKey)
if err != nil {
outputter.SetError(fmt.Errorf("failed to send mint transaction to depositor %s", depositorAddr))
outputter.SetError(fmt.Errorf("failed to send mint transaction to depositor %s: %w", depositorAddr, err))

return
}
Expand All @@ -155,7 +155,7 @@ func runCommand(cmd *cobra.Command, _ []string) {

receipt, err := txRelayer.SendTransaction(approveTxn, depositorKey)
if err != nil {
outputter.SetError(fmt.Errorf("failed to send root erc 20 approve transaction"))
outputter.SetError(fmt.Errorf("failed to send root erc 20 approve transaction: %w", err))

return
}
Expand Down
5 changes: 3 additions & 2 deletions command/bridge/deposit/erc721/deposit_erc721.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ func runCommand(cmd *cobra.Command, _ []string) {

receipt, err := txRelayer.SendTransaction(mintTxn, minterKey)
if err != nil {
outputter.SetError(fmt.Errorf("failed to send mint transaction to depositor %s", depositorAddr))
outputter.SetError(fmt.Errorf("failed to send mint transaction to depositor %s: %w",
depositorAddr, err))

return
}
Expand All @@ -150,7 +151,7 @@ func runCommand(cmd *cobra.Command, _ []string) {

receipt, err := txRelayer.SendTransaction(approveTxn, depositorKey)
if err != nil {
outputter.SetError(fmt.Errorf("failed to send root erc 721 approve transaction"))
outputter.SetError(fmt.Errorf("failed to send root erc 721 approve transaction: %w", err))

return
}
Expand Down
Loading