Skip to content

Commit

Permalink
Disable the test USDC code
Browse files Browse the repository at this point in the history
  • Loading branch information
AnthonyAkentiev committed May 21, 2024
1 parent 6cfe9ad commit c1f3e2a
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 4 deletions.
8 changes: 6 additions & 2 deletions anyns-frontend/components/connected_panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const web3 = new Web3(Web3.givenProvider)

import WarningPanel from '../components/warning_panel'

const usdcToken = require('../../deployments/sepolia/FakeUSDC.json')
//const usdcToken = require('../../deployments/sepolia/FakeUSDC.json')
const nameToken = require('../../deployments/sepolia/ERC20NameToken.json')

export default function ConnectedPanel({ isAdminMode }) {
Expand Down Expand Up @@ -43,6 +43,7 @@ export default function ConnectedPanel({ isAdminMode }) {
connectWalletOnPageLoad()
}, [])

/*
useEffect(() => {
const loadTokenBalanceAsync = async (account) => {
try {
Expand All @@ -69,8 +70,10 @@ export default function ConnectedPanel({ isAdminMode }) {
loadTokenBalanceAsync(account)
}
}, [account])
*/

useEffect(() => {
/*
const loadTokenBalanceAsync = async (account) => {
try {
const erc20Contract = new web3.eth.Contract(
Expand All @@ -86,6 +89,7 @@ export default function ConnectedPanel({ isAdminMode }) {
console.log(ex)
}
}
*/

// name tokens
const loadTokenBalance2Async = async (account) => {
Expand All @@ -110,7 +114,7 @@ export default function ConnectedPanel({ isAdminMode }) {
}

if (accountAA && typeof accountAA != 'undefined' && accountAA != '') {
loadTokenBalanceAsync(accountAA)
//loadTokenBalanceAsync(accountAA)
loadTokenBalance2Async(accountAA)
}
}, [accountAA])
Expand Down
10 changes: 10 additions & 0 deletions anyns-frontend/components/registerform.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,17 +77,27 @@ export default function RegisterForm({
const onMint = async (e) => {
e.preventDefault()

// show alert
alert('Functionality is currently switched off...')

/*
setIsProcessingMint(true)
await handleMintUsdcs()
setIsProcessingMint(false)
*/
}

const onMintAA = async (e) => {
e.preventDefault()

// show alert
alert('Functionality is currently switched off...')

/*
setIsProcessingMint(true)
await handleMintUsdcsAA()
setIsProcessingMint(false)
*/
}

const onRegister = async (e) => {
Expand Down
2 changes: 1 addition & 1 deletion anyns-frontend/lib/alchemy_aa.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export async function createAlchemyAA(metamaskOwner: SmartAccountSigner) {
//
// This smart contract will really OWN all names and NFTs
const smartAccountAddress = await provider.getAddress()
console.log('My smart account address: ')
console.log('My Smart Contract Wallet (SCW): ')
console.log(smartAccountAddress)

const erc4337client = createPublicErc4337Client({
Expand Down
6 changes: 5 additions & 1 deletion anyns-frontend/pages/register/[id].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
} from '../../lib/anyns'

const resolverJson = require('../../deployments/sepolia/AnytypeResolver.json')
const erc20usdcToken = require('../../deployments/sepolia/FakeUSDC.json')
//const erc20usdcToken = require('../../deployments/sepolia/FakeUSDC.json')
const registrarControllerJson = require('../../deployments/sepolia/AnytypeRegistrarController.json')

// Access our wallet inside of our dapp
Expand Down Expand Up @@ -49,6 +49,7 @@ export default function RegisterPage() {
}

const handleMint = async () => {
/*
const erc20Contract = new web3.eth.Contract(
erc20usdcToken.abi,
erc20usdcToken.address,
Expand Down Expand Up @@ -114,10 +115,12 @@ export default function RegisterPage() {
// update screen
//router.reload()
*/
}

// mint Fake USDC tokens
const handleMintAA = async () => {
/*
const erc20Contract = new web3.eth.Contract(
erc20usdcToken.abi,
erc20usdcToken.address,
Expand Down Expand Up @@ -176,6 +179,7 @@ export default function RegisterPage() {
// update screen
//router.reload()
*/
}

const verifyFullName = (nameFull) => {
Expand Down

0 comments on commit c1f3e2a

Please sign in to comment.