Skip to content

Commit

Permalink
fix a few minor issues according to github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
tranvictor committed May 1, 2024
1 parent ac947a7 commit 85918a3
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 7 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,7 @@ dist/
.null*
jarvis
output.json
approve.sh
migrate_signer_in_multiple_msig.sh
scan_multisig_for_signers.sh
test.json
1 change: 1 addition & 0 deletions cmd/util/context_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ func (cm *ContextManager) UnlockAccount(addr common.Address) (*account.Account,
if err != nil {
return nil, fmt.Errorf(
"You don't control wallet %s yet. You might want to add it to jarvis.\n",
addr.Hex(),
)
}
acc, err := accounts.UnlockAccount(accDesc)
Expand Down
6 changes: 3 additions & 3 deletions cmd/util/prompt_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,15 +239,15 @@ func PromptArray(input abi.Argument, prefill string, network Network) (interface
return result, nil
case abi.BytesTy:
return nil, fmt.Errorf(
"not supported array of type: %s - %s",
"not supported array of type: %s - %x",
input.Type.Elem,
input.Type.Elem.T,
)
case abi.FixedBytesTy:
return util.ConvertParamStrToFixedByteType(input.Name, *input.Type.Elem, paramsStr, network)
case abi.FunctionTy:
return nil, fmt.Errorf(
"not supported array of type: %s - %s",
"not supported array of type: %s - %x",
input.Type.Elem,
input.Type.Elem.T,
)
Expand All @@ -267,7 +267,7 @@ func PromptArray(input abi.Argument, prefill string, network Network) (interface
return result, nil
default:
return nil, fmt.Errorf(
"not supported array of type: %s - %s",
"not supported array of type: %s - %x",
input.Type.Elem,
input.Type.Elem.T,
)
Expand Down
9 changes: 7 additions & 2 deletions networks/supported_networks.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func (n *networks) getSupportedNetworkNames() []string {
func (n *networks) getNetworkByID(id uint64) (Network, error) {
res, found := n.networksByID[id]
if !found {
return nil, fmt.Errorf("network id %s is not supported", id)
return nil, fmt.Errorf("network id %d is not supported", id)
}
return res, nil
}
Expand All @@ -67,7 +67,12 @@ func newSupportedNetworks() *networks {
}
for _, n := range supportedNetworks {
if _, found := result.networks[n.GetName()]; found {
panic(fmt.Errorf("network with name or alternative name of %s already exists", n.GetName()))
panic(
fmt.Errorf(
"network with name or alternative name of %s already exists",
n.GetName(),
),
)
}
result.networks[n.GetName()] = n
result.networksByID[n.GetChainID()] = n
Expand Down
2 changes: 1 addition & 1 deletion util/account/ledgereum/ledger_driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ func (w *ledgerDriver) ledgerSign(
tx *types.Transaction,
chainId *big.Int,
) (common.Address, *types.Transaction, error) {
DebugPrintf("derivation path: %s\n", derivationPath)
DebugPrintf("derivation path: %x\n", derivationPath)
// Flatten the derivation path into the Ledger request
path := make([]byte, 1+4*len(derivationPath))
path[0] = byte(len(derivationPath))
Expand Down
2 changes: 1 addition & 1 deletion util/convert_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ func ConvertParamStrToTupleType(
value, err := ConvertParamStrToType(name, *t.TupleElems[i], inputElems[i], network)
if err != nil {
return nil, fmt.Errorf(
"couldn't parse field %s (%s), index %d with input \"%s\"",
"couldn't parse field %d (%s), index %d with input \"%s\"",
i, field.Name, field.Type, inputElems[i])
}

Expand Down

0 comments on commit 85918a3

Please sign in to comment.