Change registry.chainToekn to registry.chainTokens (#3096)

This commit is contained in:
Jaco Greeff
2021-01-23 13:36:30 +01:00
committed by GitHub
parent 6a69fdfbbf
commit 644d0e6c2e
4 changed files with 16 additions and 3 deletions
+1 -1
View File
@@ -181,7 +181,7 @@ export abstract class AbstractInt extends BN implements Codec {
? 'everything'
// FIXME In the case of multiples we need some way of detecting which instance this belongs
// to. as it stands we will always format (incorrectly) against the first token defined
: formatBalance(this, { decimals: this.registry.chainDecimals[0], withSi: true, withUnit: this.registry.chainToken[0] });
: formatBalance(this, { decimals: this.registry.chainDecimals[0], withSi: true, withUnit: this.registry.chainTokens[0] });
}
const [, divisor] = FORMATTERS.find(([type]) => type === rawType) || [];
+1 -1
View File
@@ -178,7 +178,7 @@ export class TypeRegistry implements Registry {
: undefined;
}
public get chainToken (): string[] {
public get chainTokens (): string[] {
if (this.#chainProperties?.tokenSymbol.isSome) {
const allTokens = this.#chainProperties.tokenSymbol.unwrap();
+1 -1
View File
@@ -84,7 +84,7 @@ export interface RegisteredTypes {
export interface Registry {
readonly chainDecimals: number[];
readonly chainSS58: number | undefined;
readonly chainToken: string[];
readonly chainTokens: string[];
readonly knownTypes: RegisteredTypes;
readonly signedExtensions: string[];