diff --git a/packages/sdk/contractkit/src/wrappers/FeeCurrencyDirectoryWrapper.test.ts b/packages/sdk/contractkit/src/wrappers/FeeCurrencyDirectoryWrapper.test.ts new file mode 100644 index 000000000..f468c5b85 --- /dev/null +++ b/packages/sdk/contractkit/src/wrappers/FeeCurrencyDirectoryWrapper.test.ts @@ -0,0 +1,13 @@ +import { testWithGanache } from '@celo/dev-utils/lib/ganache-test' +import { newKitFromWeb3 } from '../kit' + +testWithGanache('FeeCurrencyDirectory', (web3) => { + const kit = newKitFromWeb3(web3) + + // Fails with "FeeCurrencyDirectory not (yet) registered" + it.failing('fetches fee currency information', async () => { + const wrapper = await kit.contracts.getFeeCurrencyDirectory() + + expect(wrapper.getFeeCurrencyInformation()).toMatchInlineSnapshot() + }) +}) diff --git a/packages/sdk/contractkit/src/wrappers/FeeCurrencyWhitelistWrapper.test.ts b/packages/sdk/contractkit/src/wrappers/FeeCurrencyWhitelistWrapper.test.ts new file mode 100644 index 000000000..6819ee13d --- /dev/null +++ b/packages/sdk/contractkit/src/wrappers/FeeCurrencyWhitelistWrapper.test.ts @@ -0,0 +1,33 @@ +import { testWithGanache } from '@celo/dev-utils/lib/ganache-test' +import { newKitFromWeb3 } from '../kit' + +testWithGanache('FeeCurrencyWhitelist', (web3) => { + const kit = newKitFromWeb3(web3) + + it('fetches fee currency information', async () => { + const wrapper = await kit.contracts.getFeeCurrencyWhitelist() + + expect(await wrapper.getFeeCurrencyInformation()).toMatchInlineSnapshot(` + [ + { + "adaptedToken": undefined, + "address": "0x5315e44798395d4a952530d131249fE00f554565", + "name": "Celo Dollar", + "symbol": "cUSD", + }, + { + "adaptedToken": undefined, + "address": "0x965D352283a3C8A016b9BBbC9bf6306665d495E7", + "name": "Celo Brazilian Real", + "symbol": "cREAL", + }, + { + "adaptedToken": undefined, + "address": "0xdD66C23e07b4D6925b6089b5Fe6fc9E62941aFE8", + "name": "Celo Euro", + "symbol": "cEUR", + }, + ] + `) + }) +})