mirror of
https://github.com/Xahau/xahau.js.git
synced 2026-08-23 16:40:52 +00:00
Disable currency validity check for now.
It's too strict unfortunately and not quick to fix.
This commit is contained in:
@@ -256,9 +256,12 @@ var STCurrency = new SerializedType({
|
||||
parse: function (so) {
|
||||
var bytes = so.read(20);
|
||||
var currency = Currency.from_bytes(bytes);
|
||||
if (!currency.is_valid()) {
|
||||
throw new Error("Invalid currency: "+convert_bytes_to_hex(bytes));
|
||||
}
|
||||
// XXX Disabled check. Theoretically, the Currency class should support any
|
||||
// UInt160 value and consider it valid. But it doesn't, so for the
|
||||
// deserialization to be usable, we need to allow invalid results for now.
|
||||
//if (!currency.is_valid()) {
|
||||
// throw new Error("Invalid currency: "+convert_bytes_to_hex(bytes));
|
||||
//}
|
||||
return currency;
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user