Skip to content

Commit

Permalink
refactored and fixed test
Browse files Browse the repository at this point in the history
  • Loading branch information
raduchis committed Apr 23, 2024
1 parent 5a774a5 commit 3531379
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions node/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -1001,8 +1001,15 @@ func (n *Node) getAccountInfo(address string, options api.AccountQueryOptions) (
Balance: "0",
DeveloperReward: "0",
},
block: adaptedBlockInfo}, err
block: adaptedBlockInfo,
account: account,
}, nil
}
return accountInfo{
accountResponse: api.AccountResponse{},
block: api.BlockInfo{},
account: nil,
}, err
}

ownerAddress := ""
Expand All @@ -1013,6 +1020,7 @@ func (n *Node) getAccountInfo(address string, options api.AccountQueryOptions) (
return accountInfo{
accountResponse: api.AccountResponse{},
block: api.BlockInfo{},
account: nil,
}, err
}
}
Expand All @@ -1028,7 +1036,10 @@ func (n *Node) getAccountInfo(address string, options api.AccountQueryOptions) (
CodeMetadata: account.GetCodeMetadata(),
DeveloperReward: account.GetDeveloperReward().String(),
OwnerAddress: ownerAddress,
}, block: blockInfo}, nil
},
block: blockInfo,
account: account,
}, nil
}

// GetCode returns the code for the given code hash
Expand Down

0 comments on commit 3531379

Please sign in to comment.