Skip to content
This repository has been archived by the owner on Nov 20, 2024. It is now read-only.

Commit

Permalink
Adjust messages
Browse files Browse the repository at this point in the history
  • Loading branch information
mfcastellani committed Jun 30, 2021
1 parent e8d76a3 commit 3d1f790
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions transaction/bind.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func MarshalTransaction(itemToTransfer string,
if len(tempAccountsIdx) == 3 {
tempAccIdx, errAtoi := strconv.Atoi(tempAccountsIdx[2])
if errAtoi != nil {
err = fmt.Errorf("[MarshalTransaction] Error getting sender innerAccount index. Account: %+v - Error: %s\n", innerAccount, err.Error())
err = fmt.Errorf("[MarshalTransaction] Error getting sender Account index. Account: %+v - Error: %s\n", innerAccount, err.Error())
return
}
fromIdx = hezcommon.Idx(tempAccIdx)
Expand All @@ -112,7 +112,7 @@ func MarshalTransaction(itemToTransfer string,
if len(tempAccountsIdx) == 3 {
tempAccIdx, errAtoi := strconv.Atoi(tempAccountsIdx[2])
if errAtoi != nil {
log.Printf("[MarshalTransaction] Error getting receipient innerAccount index. Account: %+v - Error: %s\n", innerAccount, err.Error())
log.Printf("[MarshalTransaction] Error getting receipient Account index. Account: %+v - Error: %s\n", innerAccount, err.Error())
return
}
toIdx = hezcommon.Idx(tempAccIdx)
Expand All @@ -122,14 +122,14 @@ func MarshalTransaction(itemToTransfer string,

// If there is no innerAccount created to this specific token stop the code
if len(fromIdx.String()) < 1 {
err = fmt.Errorf("[MarshalTransaction] There is no sender innerAccount to this user %s for this Token %s", senderBjjWallet.HezBjjAddress, itemToTransfer)
err = fmt.Errorf("[MarshalTransaction] There is no sender Account to this user %s for this Token %s", senderBjjWallet.HezBjjAddress, itemToTransfer)
log.Println(err.Error())
return
}

// If there is no innerAccount created to this specific token stop the code
if len(toIdx.String()) < 1 {
err = fmt.Errorf("[MarshalTransaction] There is no receipient innerAccount to this user %+v for this Token %s", receipientAcctDetails, itemToTransfer)
err = fmt.Errorf("[MarshalTransaction] There is no receipient Account to this user %+v for this Token %s", receipientAcctDetails, itemToTransfer)
log.Println(err.Error())
return
}
Expand Down

0 comments on commit 3d1f790

Please sign in to comment.