fix none type in interface
@@ -893,6 +893,7 @@ class SubstrateWSInterface:
pairs = response.get('result')
# convert keys to the portion that needs to be decoded.
+ if pairs != None:
pairs = map(lambda kp: ["0x" + kp[0][prefix_len + concat_hash_len:], kp[1]], pairs)
# decode both of them
@@ -900,6 +901,9 @@ class SubstrateWSInterface:
lambda kp: [self.decode_scale(key_type, kp[0]), self.decode_scale(value_type, kp[1])],
list(pairs)
)
+ else:
+ # occurs if pairs returns a Nonetype.
+ pairs = []
return list(pairs)
