store certifier index in constant

This commit is contained in:
Jannis R 2016-12-15 20:45:49 +01:00
parent 7fdcc70825
commit d2962fe47b
No known key found for this signature in database
GPG Key ID: 0FE83946296A88A5
2 changed files with 6 additions and 2 deletions

View File

@ -23,6 +23,8 @@ import VerificationStore, {
} from './store'; } from './store';
import { postToServer } from '../../3rdparty/email-verification'; import { postToServer } from '../../3rdparty/email-verification';
const EMAIL_VERIFICATION = 4; // id in the `BadgeReg.sol` contract
export default class EmailVerificationStore extends VerificationStore { export default class EmailVerificationStore extends VerificationStore {
@observable email = ''; @observable email = '';
@ -54,7 +56,7 @@ export default class EmailVerificationStore extends VerificationStore {
} }
constructor (api, account, isTestnet) { constructor (api, account, isTestnet) {
super(api, EmailVerificationABI, 4, account, isTestnet); super(api, EmailVerificationABI, EMAIL_VERIFICATION, account, isTestnet);
} }
requestValues = () => [ sha3(this.email) ] requestValues = () => [ sha3(this.email) ]

View File

@ -23,6 +23,8 @@ import VerificationStore, {
} from './store'; } from './store';
import { postToServer } from '../../3rdparty/sms-verification'; import { postToServer } from '../../3rdparty/sms-verification';
const SMS_VERIFICATION = 0; // id in the `BadgeReg.sol` contract
export default class SMSVerificationStore extends VerificationStore { export default class SMSVerificationStore extends VerificationStore {
@observable number = ''; @observable number = '';
@ -53,7 +55,7 @@ export default class SMSVerificationStore extends VerificationStore {
} }
constructor (api, account, isTestnet) { constructor (api, account, isTestnet) {
super(api, SMSVerificationABI, 0, account, isTestnet); super(api, SMSVerificationABI, SMS_VERIFICATION, account, isTestnet);
} }
@action setNumber = (number) => { @action setNumber = (number) => {