Merge pull request #3864 from ethcore/jr-fix-verification
fix verification stores
This commit is contained in:
commit
5fb34573c6
@ -23,6 +23,8 @@ import VerificationStore, {
|
||||
} from './store';
|
||||
import { postToServer } from '../../3rdparty/email-verification';
|
||||
|
||||
const EMAIL_VERIFICATION = 4; // id in the `BadgeReg.sol` contract
|
||||
|
||||
export default class EmailVerificationStore extends VerificationStore {
|
||||
@observable email = '';
|
||||
|
||||
@ -54,7 +56,7 @@ export default class EmailVerificationStore extends VerificationStore {
|
||||
}
|
||||
|
||||
constructor (api, account, isTestnet) {
|
||||
super(api, EmailVerificationABI, 'emailverification3', account, isTestnet);
|
||||
super(api, EmailVerificationABI, EMAIL_VERIFICATION, account, isTestnet);
|
||||
}
|
||||
|
||||
requestValues = () => [ sha3(this.email) ]
|
||||
|
@ -23,6 +23,8 @@ import VerificationStore, {
|
||||
} from './store';
|
||||
import { postToServer } from '../../3rdparty/sms-verification';
|
||||
|
||||
const SMS_VERIFICATION = 0; // id in the `BadgeReg.sol` contract
|
||||
|
||||
export default class SMSVerificationStore extends VerificationStore {
|
||||
@observable number = '';
|
||||
|
||||
@ -53,7 +55,7 @@ export default class SMSVerificationStore extends VerificationStore {
|
||||
}
|
||||
|
||||
constructor (api, account, isTestnet) {
|
||||
super(api, SMSVerificationABI, 'smsverification', account, isTestnet);
|
||||
super(api, SMSVerificationABI, SMS_VERIFICATION, account, isTestnet);
|
||||
}
|
||||
|
||||
@action setNumber = (number) => {
|
||||
|
@ -46,13 +46,13 @@ export default class VerificationStore {
|
||||
@observable isCodeValid = null;
|
||||
@observable confirmationTx = null;
|
||||
|
||||
constructor (api, abi, name, account, isTestnet) {
|
||||
constructor (api, abi, certifierId, account, isTestnet) {
|
||||
this.api = api;
|
||||
this.account = account;
|
||||
this.isTestnet = isTestnet;
|
||||
|
||||
this.step = LOADING;
|
||||
Contracts.get().badgeReg.fetchCertifier(name)
|
||||
Contracts.get().badgeReg.fetchCertifier(certifierId)
|
||||
.then(({ address }) => {
|
||||
this.contract = new Contract(api, abi).at(address);
|
||||
this.load();
|
||||
|
Loading…
Reference in New Issue
Block a user