Skip to content

Commit

Permalink
fix lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
tone-711 committed Apr 1, 2024
1 parent 5f34e4a commit 23fda6e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/main/main.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/* eslint global-require: off, no-console: off, promise/always-return: off */

/**
/* eslint-disable */
/***
* This module executes inside of electron's main process. You can start
* electron renderer process from here and communicate with the other processes
* through IPC.
*
* When running `npm run build` or `npm run build:main`, this file is compiled to
* `./src/main.js` using webpack. This gives us some performance wins.
*/

import 'dotenv/config';
import { config } from 'dotenv';
import path from 'path';
Expand Down
1 change: 1 addition & 0 deletions src/renderer/src/components/QrScanner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const BootstrapDialog = styled(Dialog)(({ theme }) => ({
},
}));

/* @ts-ignore */
export default function QrScanner({ isOpen, onScan, onError, onClose }) {
return (
<React.Fragment>
Expand Down
9 changes: 7 additions & 2 deletions src/renderer/src/utils/sendTokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ const sendTokens = async (sa, t, amt, pm = true) => {
const saAddress = await smartAccount.getAccountAddress();
console.log('SA Address', saAddress);

let txHash = null;

if (pm) {
// ------ 4. Send user operation and get tx hash
const tx = await smartAccount.sendTransaction(transferTx, {
Expand All @@ -55,7 +57,7 @@ const sendTokens = async (sa, t, amt, pm = true) => {
console.log('transactionHash', transactionHash);
alert(`Transaction Successful: ${transactionHash}`);

return transactionHash;
txHash = transactionHash;
} else {
// ------ 4. Send user operation and get tx hash
const tx = await smartAccount.sendTransaction(transferTx);
Expand All @@ -64,10 +66,13 @@ const sendTokens = async (sa, t, amt, pm = true) => {
console.log('transactionHash', transactionHash);
alert(`Transaction Successful: ${transactionHash}`);

return transactionHash;
txHash = transactionHash;
}
return txHash;
} catch (err) {
alert(`Transaction Error: ${err}`);

return null;
}
};

Expand Down

0 comments on commit 23fda6e

Please sign in to comment.