You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
New should take a first parameter walletAddress string and add it into the &AccountInfo{} return statement.
Serialize should call hex.DecodeString on accInfo.WalletAddress and prepend it to the converted Balance bytes
Deserialize should call hex.EncodeToString on the portion of the byte array that is the wallet address
accountinfo_test.go
Make all tests pass with new changes
producer_test.go
Remove the TestResponseToAccoutnInfoRequest test completely
accountstable.go
Modify GetAccountInfo to first convert the the pkhash parameter to a string using hex.EncodeToString, then correct the return statement with the missing field
accountstable_test.go
Correct the TestAccountInfo test to make it pass now
handlers.go
In HandleAccountInfoRequest, remove the AccountInfo struct definition
In the same function, refactor var accInfo AccountInfo to use accountinfo.AccountInfo instead
This correct may need to made after the if ok { branch
handlers_test.go
Make sure tests are passing
Guidance:
Remember you can always run go test -v ./... at project root to run all tests and see what's failing
accountinfo.go
Add a
WalletAddress string
field toAccountInfo
New
should take a first parameterwalletAddress string
and add it into the&AccountInfo{}
return statement.Serialize
should callhex.DecodeString
onaccInfo.WalletAddress
and prepend it to the convertedBalance
bytesDeserialize
should callhex.EncodeToString
on the portion of the byte array that is the wallet addressaccountinfo_test.go
Make all tests pass with new changes
producer_test.go
Remove the
TestResponseToAccoutnInfoRequest
test completelyaccountstable.go
Modify
GetAccountInfo
to first convert the thepkhash
parameter to astring
usinghex.EncodeToString
, then correct thereturn
statement with the missing fieldaccountstable_test.go
Correct the
TestAccountInfo
test to make it pass nowhandlers.go
In
HandleAccountInfoRequest
, remove theAccountInfo struct
definitionIn the same function, refactor
var accInfo AccountInfo
to useaccountinfo.AccountInfo
insteadThis correct may need to made after the
if ok {
branchhandlers_test.go
Guidance:
go test -v ./...
at project root to run all tests and see what's failingThe text was updated successfully, but these errors were encountered: