diff --git a/contracts/ore.instrument/ore.instrument.cpp b/contracts/ore.instrument/ore.instrument.cpp index 8787bf9..61f5fdc 100644 --- a/contracts/ore.instrument/ore.instrument.cpp +++ b/contracts/ore.instrument/ore.instrument.cpp @@ -235,8 +235,7 @@ ACTION instrument::checkright(name minter, name issuer, string rightname, uint64 bool minter_owns_right = rightitr.owner == minter; if (!minter_owns_right) { - auto position_in_whitelist = std::find(rightitr.issuer_whitelist.begin(), rightitr.issuer_whitelist.end(), minter); - + auto position_in_whitelist = std::find(rightitr.issuer_whitelist.begin(), rightitr.issuer_whitelist.end(), minter); //if minter is not in whitelist, cancel the entire mint transaction if (position_in_whitelist == rightitr.issuer_whitelist.end()) { @@ -245,13 +244,12 @@ ACTION instrument::checkright(name minter, name issuer, string rightname, uint64 cancel_deferred(deferred_transaction_id); } msg = "Attempt to create instrument with right: " + rightname + " by minter: " + minter.to_string() + " who isn't whitelisted or owner of right"; - eosio_assert(position_in_whitelist != rightitr.issuer_whitelist.end(), msg.c_str()); + eosio_assert(false, msg.c_str()); } } // check if the issuer of the instrument is the owner of the right bool issuer_owns_right = rightitr.owner == issuer; - if (!issuer_owns_right) { auto issuer_in_whitelist = std::find(rightitr.issuer_whitelist.begin(), rightitr.issuer_whitelist.end(), issuer); @@ -263,7 +261,7 @@ ACTION instrument::checkright(name minter, name issuer, string rightname, uint64 cancel_deferred(deferred_transaction_id); } msg = "Attempt to create instrument with right: " + rightname + " by issuer: " + issuer.to_string() + " who isn't whitelisted or owner of right"; - eosio_assert(issuer_in_whitelist != rightitr.issuer_whitelist.end(), msg.c_str()); + eosio_assert(false, msg.c_str()); } } } diff --git a/contracts/ore.rights_registry/--url b/contracts/ore.rights_registry/--url new file mode 100644 index 0000000..413349a --- /dev/null +++ b/contracts/ore.rights_registry/--url @@ -0,0 +1,11 @@ + + + + + Error 411 (Length Required)!!1 + + +

411. That’s an error. +

POST requests require a Content-length header. That’s all we know. diff --git a/tests/instrument.py b/tests/instrument.py index b8f71f9..f5aa4aa 100644 --- a/tests/instrument.py +++ b/tests/instrument.py @@ -1,5 +1,6 @@ import unittest from eosfactory.eosf import * +import time verbosity([Verbosity.INFO, Verbosity.OUT, Verbosity.TRACE, Verbosity.DEBUG]) @@ -296,7 +297,7 @@ def test_06(self): COMMENT(''' Update Instrument: ''') - + time.sleep(3) instr.push_action( "createinst", { @@ -306,7 +307,7 @@ def test_06(self): "instrument": { "issuer": app, "instrument_class": "sample_class", - "description": "different_description", + "description": "sample_description", "instrument_template": "", "security_type": "", "parameter_rules": [], diff --git a/tests/rights_registry.py b/tests/rights_registry.py index d475b05..114f4a0 100644 --- a/tests/rights_registry.py +++ b/tests/rights_registry.py @@ -63,11 +63,11 @@ def test_02(self): }, permission=(app, Permission.ACTIVE)) - with self.assertRaises(Error): #You are not the issuer of the existing right. Update canceled. + with self.assertRaises(Error): #You are not the issuer of the existing contract. Update canceled. right.push_action( "upsertright", { - "owner": right, + "owner": app, "right_name": "apimarket.manager.licenseApi", "urls": [{ "base_right": "",