Change all usages of .substr to .substring (#4809)

This commit is contained in:
Jaco
2022-05-10 10:39:15 +03:00
committed by GitHub
parent 22db4f1c3d
commit 54e94ec6bc
6 changed files with 19 additions and 19 deletions
+1 -1
View File
@@ -21,7 +21,7 @@ function retrieveNick (api: DeriveApi, accountId?: AccountId): Observable<string
) as Observable<Option<ITuple<[Bytes, Balance]>> | undefined>).pipe(
map((nameOf): string | undefined =>
nameOf?.isSome
? u8aToString(nameOf.unwrap()[0]).substr(0, (api.consts.nicks.maxLength as u32).toNumber())
? u8aToString(nameOf.unwrap()[0]).substring(0, (api.consts.nicks.maxLength as u32).toNumber())
: undefined
)
);