Skip to content

Commit

Permalink
chore: remove useless logs
Browse files Browse the repository at this point in the history
  • Loading branch information
eccentricexit committed May 7, 2021
1 parent 408464a commit 0e78c1d
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions src/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,6 @@ const App = (): JSX.Element => {
}, [account, erc20, metaTxProxy]);
const allowanceEnough = useMemo(() => {
if (!allowance || !brcodePreview) return false;
console.info('allowance', allowance.toString());
console.info(
'brcodePreview.tokenAmountRequired',
brcodePreview.tokenAmountRequired
);
return allowance.gte(
ethers.BigNumber.from(brcodePreview.tokenAmountRequired)
);
Expand Down Expand Up @@ -134,11 +129,8 @@ const App = (): JSX.Element => {
tokenAmountRequired: '0',
};
const amount = tokenAmountRequired;
console.info('balance', (await erc20.balanceOf(account)).toString());
const from = account;
const to = process.env.REACT_APP_TARGET_WALLET || '';
console.info('to', to);
console.info('amountRequired', amount);

const types = { ERC20MetaTransaction };
const domain = {
Expand All @@ -156,23 +148,6 @@ const App = (): JSX.Element => {
expiry: Math.ceil(Date.now() / 1000 + 24 * 60 * 60),
};
const signature = await signer._signTypedData(domain, types, message);
console.info('nonce', message.nonce);
console.info(
'recovered',
await metaTxProxy.verify(
{
from,
to,
signature,
},
{
tokenContract: message.tokenContract,
amount: message.amount,
nonce: message.nonce,
expiry: message.expiry,
}
)
);

await fetch(`${process.env.REACT_APP_BACKEND_URL}/request-payment`, {
method: 'POST',
Expand Down

0 comments on commit 0e78c1d

Please sign in to comment.