Refactors to use new metadata pointers.

This commit is contained in:
PhilipWafula 2021-10-15 14:26:28 +03:00
parent 1c3905fc39
commit 71ec492347
Signed by: mango-habanero
GPG Key ID: B00CE9034DA19FB7

View File

@ -56,7 +56,7 @@ class Meta(Data):
def reference(self, token_address): def reference(self, token_address):
token_address_bytes = bytes.fromhex(strip_0x(token_address)) token_address_bytes = bytes.fromhex(strip_0x(token_address))
return generate_metadata_pointer(token_address_bytes, MetadataPointer.TOKEN) return generate_metadata_pointer(token_address_bytes, MetadataPointer.TOKEN_META)
def asdict(self): def asdict(self):
@ -91,6 +91,6 @@ class Meta(Data):
class MetadataWriter(OutputWriter): class MetadataWriter(OutputWriter):
def write(self, k, v): def write(self, k, v):
rq = MetadataRequestsHandler(MetadataPointer.TOKEN, bytes.fromhex(k)) rq = MetadataRequestsHandler(MetadataPointer.TOKEN_META, bytes.fromhex(k))
return rq.create(json.loads(v.decode('utf-8'))) return rq.create(json.loads(v.decode('utf-8')))