Skip to content

Commit

Permalink
Optimize code and fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonHJ committed Feb 16, 2022
1 parent 1fe02b3 commit 77a6bf9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/app/componentUtils/trezor/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export const getPublicKey = callback => {

export const signPersonalMessage = async (path, message) => {
let bHex = false;
if (message.indexOf('0x') !== -1) {
if (message.startsWith('0x')) {
bHex = true;
message = message.slice(2);
}
Expand Down
4 changes: 2 additions & 2 deletions src/app/components/SendNormalTrans/SendXRPNormalTrans.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import XRPNormalTransForm from 'components/NormalTransForm/XRPNormalTrans/XRPNor
const CollectionCreateForm = Form.create({ name: 'XRPNormalTransForm' })(XRPNormalTransForm);

const SendXRPNormalTrans = observer(({ record }) => {
const { orignBalance, address: from, path, balance } = record
const { orignBalance, address: from, path, balance, wid } = record
const { languageIntl, session, sendTransParams: { updateXRPTransParams, XRPTransParams } } = useContext(MobXProviderContext)
const [visible, setVisible] = useState(false);

Expand All @@ -20,7 +20,7 @@ const SendXRPNormalTrans = observer(({ record }) => {
}
setVisible(true);
try {
updateXRPTransParams({ from, chainId: session.chainId, BIP44Path: path });
updateXRPTransParams({ from, chainId: session.chainId, BIP44Path: path, walletID: wid });
} catch (err) {
console.log(`showModal: ${err}`)
message.warn(intl.get('network.down'));
Expand Down
2 changes: 1 addition & 1 deletion src/controllers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2442,7 +2442,7 @@ ipc.on(ROUTE_STOREMAN, async (event, actionUni, payload) => {
case 'openStoremanAction':
try {
let { tx, action, isEstimateFee } = payload;
if (!tx.gasLimit) {
if (!tx.gasLimit || !Number(tx.gasLimit)) {
tx.gasLimit = 2000000;
}
// let gasPrice = await ccUtil.getGasPrice('wan');
Expand Down

0 comments on commit 77a6bf9

Please sign in to comment.