Closed stuartwk closed 3 years ago
In the
/account/balance
endpoint,block_identifier
is an optional param.In the AccountController, if there is no
block_identifier
, this leaves therevision
param as undefined. https://github.com/vechain/rosetta/blob/master/src/app/controllers/account/controller.ts#L23The
revision
param is passed togetAccountBalance
andgetBlockDetail
. Inside of blockchainInfoService, there is the code https://github.com/vechain/rosetta/blob/master/src/server/service/blockchainInfoService.ts#L147. It is forcingrevision
to a string, though it is undefined, which throws the errorcannot read 'toString' of property undefined
.
Hi @stuartkuentzel , thank you for your issus. i had fix it.
In the
/account/balance
endpoint,block_identifier
is an optional param.In the AccountController, if there is no
block_identifier
, this leaves therevision
param as undefined. https://github.com/vechain/rosetta/blob/master/src/app/controllers/account/controller.ts#L23The
revision
param is passed togetAccountBalance
andgetBlockDetail
. Inside of blockchainInfoService, there is the code https://github.com/vechain/rosetta/blob/master/src/server/service/blockchainInfoService.ts#L147. It is forcingrevision
to a string, though it is undefined, which throws the errorcannot read 'toString' of property undefined
.