This commit is contained in:
Jaco
2022-05-15 11:45:18 +03:00
committed by GitHub
parent 3d8ba0f1bf
commit 23c23a81b3
19 changed files with 179 additions and 171 deletions
+5 -5
View File
@@ -20,20 +20,20 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "8.4.1",
"version": "8.4.2",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.17.9",
"@polkadot/keyring": "^9.2.1",
"@polkadot/types-augment": "8.4.1",
"@polkadot/types-codec": "8.4.1",
"@polkadot/types-create": "8.4.1",
"@polkadot/types-augment": "8.4.2",
"@polkadot/types-codec": "8.4.2",
"@polkadot/types-create": "8.4.2",
"@polkadot/util": "^9.2.1",
"@polkadot/util-crypto": "^9.2.1",
"rxjs": "^7.5.5"
},
"devDependencies": {
"@polkadot/keyring": "^9.2.1",
"@polkadot/types-support": "8.4.1"
"@polkadot/types-support": "8.4.2"
}
}
+3 -2
View File
@@ -2,6 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
import type { AnyU8a, Registry } from '@polkadot/types-codec/types';
import type { BN } from '@polkadot/util';
import type { IExtrinsicEra, INumber } from '../types';
import { Enum, Raw, Tuple, U64 } from '@polkadot/types-codec';
@@ -200,7 +201,7 @@ export class MortalEra extends Tuple {
/**
* @description Get the block number of the start of the era whose properties this object describes that `current` belongs to.
*/
public birth (current: INumber | number): number {
public birth (current: BN | bigint | number | string): number {
// FIXME No toNumber() here
return Math.floor(
(
@@ -212,7 +213,7 @@ export class MortalEra extends Tuple {
/**
* @description Get the block number of the first block at which the era has ended.
*/
public death (current: INumber | number): number {
public death (current: BN | bigint | number | string): number {
// FIXME No toNumber() here
return this.birth(current) + this.period.toNumber();
}