Disable currency validity check for now.

It's too strict unfortunately and not quick to fix.
This commit is contained in:
Stefan Thomas
2013-08-23 19:08:53 -07:00
parent 74da0c8a52
commit 166e35bf0e

View File

@@ -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;
}
});