Linked map in v0 (#886)

This commit is contained in:
Amaury Martiny
2019-05-08 17:10:16 +02:00
committed by Jaco Greeff
parent 427ce14ade
commit 865e480a1e
+9 -3
View File
@@ -115,9 +115,15 @@ export class StorageFunctionType extends EnumType<PlainType | MapType> {
* @description Returns the string representation of the value
*/
toString (): string {
return this.isMap
? this.asMap.value.toString()
: this.asType.toString();
if (this.isMap) {
if (this.asMap.isLinked) {
return `(${this.asMap.value.toString()}, Linkage<${this.asMap.key.toString()}>)`;
}
return this.asMap.value.toString();
}
return this.asType.toString();
}
}