Skip to content

Commit

Permalink
Contracts: stet RegisteredToken attributes. Relates to #89
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason Banks committed Feb 2, 2018
1 parent cecb519 commit 8b31551
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
13 changes: 2 additions & 11 deletions contracts/OpenSTUtility.sol
Expand Up @@ -45,9 +45,6 @@ contract OpenSTUtility is Hasher, OpsManaged, STPrimeConfig {
struct RegisteredToken {
UtilityTokenInterface token;
address registrar;
string symbol;
string name;
uint256 conversionRate;
}

struct Mint {
Expand Down Expand Up @@ -170,10 +167,7 @@ contract OpenSTUtility is Hasher, OpsManaged, STPrimeConfig {

registeredTokens[uuidSTPrime] = RegisteredToken({
token: UtilityTokenInterface(simpleTokenPrime),
registrar: registrar,
symbol: STPRIME_SYMBOL,
name: STPRIME_NAME,
conversionRate: STPRIME_CONVERSION_RATE
registrar: registrar
});

uuids.push(uuidSTPrime);
Expand Down Expand Up @@ -612,10 +606,7 @@ contract OpenSTUtility is Hasher, OpsManaged, STPrimeConfig {

registeredTokens[registeredUuid] = RegisteredToken({
token: _brandedToken,
registrar: registrar,
symbol: _symbol,
name: _name,
conversionRate: _conversionRate
registrar: registrar
});

// register name to registrar
Expand Down
2 changes: 1 addition & 1 deletion test/OpenSTUtility.js
Expand Up @@ -203,7 +203,7 @@ contract('OpenSTUtility', function(accounts) {
assert.equal(await openSTUtility.registerBrandedToken.call(symbol, name, conversionRate, accounts[0], brandedToken, checkBtUuid, { from: registrar }), checkBtUuid);
result = await openSTUtility.registerBrandedToken(symbol, name, conversionRate, accounts[0], brandedToken, checkBtUuid, { from: registrar });
assert.equal(await openSTUtility.getUuidsSize.call(), 2);
assert.equal((await openSTUtility.registeredTokens.call(checkBtUuid))[2], symbol);
assert.equal((await openSTUtility.registeredTokens.call(checkBtUuid))[0], brandedToken);
await OpenSTUtility_utils.checkRegisteredBrandedTokenEvent(result.logs[0], registrar, brandedToken, checkBtUuid, symbol, name, conversionRate, accounts[0]);
})
})
Expand Down

0 comments on commit 8b31551

Please sign in to comment.