Skip to content

Commit

Permalink
update number to 0xstring
Browse files Browse the repository at this point in the history
  • Loading branch information
marshacb committed Sep 18, 2023
1 parent 8eefeab commit 17b4255
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
8 changes: 4 additions & 4 deletions src/services/blocks/BlocksService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -814,10 +814,10 @@ export class BlocksService extends AbstractService {
});

return {
parentHash: parentHash.toString(),
number: number.toString(),
stateRoot: stateRoot.toString(),
extrinsicRoot: extrinsicsRoot.toString(),
parentHash: parentHash,
number: number.toHex(),
stateRoot: stateRoot,
extrinsicRoot: extrinsicsRoot,
digest: { logs },
extrinsics: extrinsics,
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"parentHash": "0x205da5dba43bbecae52b44912249480aa9f751630872b6b6ba1a9d2aeabf0177",
"number": "789629",
"number": "0x000c0c7d",
"stateRoot": "0x023b5bb1bc10a1a91a9ef683f46a8bb09666c50476d5592bd6575a73777eb173",
"extrinsicRoot": "0x4c1d65bf6b57086f00d5df40aa0686ffbc581ef60878645613b1fc3303de5030",
"digest": {
Expand Down
9 changes: 5 additions & 4 deletions src/types/responses/BlockRaw.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,16 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
import { GenericExtrinsic, Vec } from '@polkadot/types';
import { BlockHash, Hash } from '@polkadot/types/interfaces';
import { AnyTuple } from '@polkadot/types/types';

import { ILog } from './Block';

export interface IBlockRaw {
parentHash: string;
number: string;
stateRoot: string;
extrinsicRoot: string;
parentHash: BlockHash;
number: `0x${string}`;
stateRoot: Hash;
extrinsicRoot: Hash;
digest: IDigest;
extrinsics: Vec<GenericExtrinsic<AnyTuple>>;
}
Expand Down

0 comments on commit 17b4255

Please sign in to comment.