Add isEmpty to AccountId (#583)

This commit is contained in:
Jaco Greeff
2019-01-14 14:42:51 +01:00
committed by GitHub
parent c50289d15a
commit 0576375a2b
+7
View File
@@ -40,6 +40,13 @@ export default class AccountId extends U8aFixed {
return value;
}
/**
* @description Returns true if the type wraps a non-encodable value
*/
get isEmpty (): boolean {
return this.length !== 32;
}
/**
* @description Converts the Object to JSON, typically used for RPC transfers
*/