Skip to content

Commit

Permalink
Print errors (#1768)
Browse files Browse the repository at this point in the history
  • Loading branch information
goran-ethernal committed Aug 1, 2023
1 parent 4653fea commit 65c9a3e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
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

0 comments on commit 65c9a3e

Please sign in to comment.