Skip to content

Commit

Permalink
add the new address system #229
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiaszCudnik committed Jun 21, 2019
1 parent 9d9c487 commit 92fd55b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
5 changes: 2 additions & 3 deletions src/containers/onboarding/MnemonicAccountPage.tsx
Expand Up @@ -18,7 +18,7 @@ import ModalPaperHeader from '../../components/ModalPaperHeader';
import { onboardingAddAccountRoute, accountOverviewRoute } from '../../routes';
import { AccountType } from '../../stores/account';
import WalletStore from '../../stores/wallet';
import { normalizeMnemonic } from '../../utils/utils';
import { normalizeMnemonic, AccountIDType } from '../../utils/utils';
import { Rise } from 'dpos-offline';

const styles = createStyles({
Expand Down Expand Up @@ -113,8 +113,7 @@ class MnemonicAccountPage extends React.Component<DecoratedProps, State> {
return Rise.calcAddress(
Rise.deriveKeypair(normalized).publicKey,
this.injected.walletStore.getTxNetwork(),
// TODO whats that?
'v0'
AccountIDType.NEW
);
}
return null;
Expand Down
3 changes: 1 addition & 2 deletions src/stores/wallet.ts
Expand Up @@ -558,8 +558,7 @@ export default class WalletStore {
});
}

// @ts-ignore TODO array
const res = await this.dposAPI.transactions.put(signedTx);
const res = await this.dposAPI.transactions.postSingle(signedTx);
await this.refreshAccount(account.id);
return res;
}
Expand Down
5 changes: 5 additions & 0 deletions src/utils/utils.ts
Expand Up @@ -164,3 +164,8 @@ export function formatFiat(
export type FullDelegate = Delegate & {
infos: DelegateInfos;
};

export enum AccountIDType {
OLD = 'v0',
NEW = 'v1'
}

0 comments on commit 92fd55b

Please sign in to comment.