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 35f4d28 commit bcbd4f5
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
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,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 @@ -624,10 +618,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
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,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 bcbd4f5

Please sign in to comment.