Fix the GSNBouncerERC20Fee token decimals to 18 (#1929)

* fix erc20 fee token decimals to 18

* lint

* Update contracts/GSN/bouncers/GSNBouncerERC20Fee.sol

Co-Authored-By: Nicolás Venturo <nicolas.venturo@gmail.com>

* change location of hardcoded decimals for clarity

* remove mention of decimals from docs

* remove trailing whitespace from guide

(cherry picked from commit b8ccf8e0f1)
This commit is contained in:
Francisco Giordano
2019-10-07 19:21:28 -03:00
parent 8026a8ae2e
commit 4f4d305784
4 changed files with 17 additions and 21 deletions

View File

@ -1,4 +1,4 @@
const { BN, ether, expectEvent } = require('openzeppelin-test-helpers');
const { ether, expectEvent } = require('openzeppelin-test-helpers');
const gsn = require('@openzeppelin/gsn-helpers');
const { expect } = require('chai');
@ -10,10 +10,9 @@ const IRelayHub = artifacts.require('IRelayHub');
contract('GSNBouncerERC20Fee', function ([_, sender, other]) {
const name = 'FeeToken';
const symbol = 'FTKN';
const decimals = new BN('18');
beforeEach(async function () {
this.recipient = await GSNBouncerERC20FeeMock.new(name, symbol, decimals);
this.recipient = await GSNBouncerERC20FeeMock.new(name, symbol);
this.token = await ERC20Detailed.at(await this.recipient.token());
});
@ -26,8 +25,8 @@ contract('GSNBouncerERC20Fee', function ([_, sender, other]) {
expect(await this.token.symbol()).to.equal(symbol);
});
it('has decimals', async function () {
expect(await this.token.decimals()).to.be.bignumber.equal(decimals);
it('has 18 decimals', async function () {
expect(await this.token.decimals()).to.be.bignumber.equal('18');
});
});