diff --git a/js/src/contracts/badgereg.js b/js/src/contracts/badgereg.js index 0813caa47..b9b10c19f 100644 --- a/js/src/contracts/badgereg.js +++ b/js/src/contracts/badgereg.js @@ -73,6 +73,26 @@ export default class BadgeReg { }); } + fetchCertifierByName (name) { + return this + .getContract() + .then((badgeReg) => { + return badgeReg.instance.fromName.call({}, [ name ]); + }) + .then(([ id, address, owner ]) => { + if (address === ZERO20) { + throw new Error(`Certifier ${name} does not exist.`); + } + + return this.fetchMeta(id) + .then(({ title, icon }) => { + const data = { address, id, name, title, icon }; + this.certifiers[id] = data; + return data; + }); + }); + } + fetchMeta (id) { return this .getContract() diff --git a/js/src/modals/Verification/GatherData/gatherData.js b/js/src/modals/Verification/GatherData/gatherData.js index 888585fcc..2afab1344 100644 --- a/js/src/modals/Verification/GatherData/gatherData.js +++ b/js/src/modals/Verification/GatherData/gatherData.js @@ -115,13 +115,26 @@ export default class GatherData extends Component { if (!fee) { return (
Fetching the feeā¦
); } + if (fee.eq(0)) { + return ( +
+