Skip to content

Commit 6fa8894

Browse files
update
1 parent ddbdcee commit 6fa8894

File tree

5 files changed

+19
-5
lines changed

5 files changed

+19
-5
lines changed

src/components/widgets/components/price-update/price-update.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class PriceUpdateModuleComponent extends React.Component<IReduxProps & IExternal
6060
JSON.stringify(this.props[key]) !== JSON.stringify(prevProps[key])
6161
) {
6262
this.fetchDataTimeout && clearTimeout(this.fetchDataTimeout);
63-
this.fetchDataTimeout = setTimeout(() => this.fetchData(), 200);
63+
this.fetchDataTimeout = setTimeout(() => this.fetchData(), 300);
6464
}
6565
}
6666
}

src/core/wallet/hw-wallet/ledger/apps/zil.ts

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import ZilApp from './zil-interface';
22
import * as zcrypto from '@zilliqa-js/crypto';
33
import { IBlockchainTransaction } from '../../../../blockchain/types';
44
import BigNumber from 'bignumber.js';
5+
import { isBech32 } from '@zilliqa-js/util/dist/validation';
56
// import Long from 'long';
67
// import * as ZilliqaJsAccountUtil from '@zilliqa-js/account/dist/util';
78

@@ -31,14 +32,18 @@ export class Zil {
3132
path: string,
3233
tx: IBlockchainTransaction
3334
): Promise<any> => {
35+
const toAddr = isBech32(tx.toAddress)
36+
? zcrypto
37+
.fromBech32Address(tx.toAddress)
38+
.replace('0x', '')
39+
.toLowerCase()
40+
: tx.toAddress.toLowerCase();
41+
3442
const transaction: any = {
3543
// tslint:disable-next-line: no-bitwise
3644
version: (Number(tx.chainId) << 16) + 1,
3745
nonce: tx.nonce,
38-
toAddr: zcrypto
39-
.fromBech32Address(tx.toAddress)
40-
.replace('0x', '')
41-
.toLowerCase(),
46+
toAddr,
4247
amount: tx.amount ? new BigNumber(tx.amount).toFixed() : '0',
4348
pubKey: tx.publicKey,
4449
gasPrice: new BigNumber(tx.feeOptions.gasPrice).toString(),
@@ -48,13 +53,15 @@ export class Zil {
4853
data: tx.data ? tx.data.raw : '',
4954
priority: true
5055
};
56+
5157
const signed = await this.app.signTxn(index, transaction);
5258

5359
transaction.signature = signed.sig;
5460
transaction.amount = transaction.amount.toString();
5561
transaction.gasLimit = transaction.gasLimit.toString();
5662
transaction.gasPrice = transaction.gasPrice.toString();
5763
transaction.toAddr = zcrypto.toChecksumAddress(transaction.toAddr).replace('0x', '');
64+
5865
return transaction;
5966
};
6067

src/redux/wallets/selectors.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ export const getSelectedAccountTransactions = (state: IReduxState): IBlockchainT
124124
tx2.date?.created - tx1.date?.created
125125
);
126126
}
127+
return [];
127128
};
128129

129130
export const getAccounts = (state: IReduxState, blockchain: Blockchain): IAccountState[] => {

src/screens/token/components/default-token/default-token.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,9 @@ export class DefaultTokenScreenComponent extends React.Component<
132132
step: 'SwapEnterAmount',
133133
key: 'swap-enter-amount'
134134
},
135+
navigationOptions: {
136+
title: translate('App.labels.swap')
137+
},
135138
newFlow: true
136139
})
137140
}

src/screens/token/components/delegate-token/components/tabs/account-tab/account-tab.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,9 @@ export class AccountTabComponent extends React.Component<
149149
step: 'SwapEnterAmount',
150150
key: 'swap-enter-amount'
151151
},
152+
navigationOptions: {
153+
title: translate('App.labels.swap')
154+
},
152155
newFlow: true
153156
})
154157
}

0 commit comments

Comments
 (0)