Skip to content

Commit

Permalink
remove checksummed address
Browse files Browse the repository at this point in the history
  • Loading branch information
tempe-techie committed May 6, 2024
1 parent d7a0a63 commit fefb2f5
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 7 deletions.
4 changes: 0 additions & 4 deletions src/pinia-stores/ethers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,11 @@ export const useEthersStore = defineStore('ethers', {

export function useEthers() {
const ethersStore = useEthersStore()
const { address } = useVueDapp()

const checksummedAddress = address.value ? ethers.utils.getAddress(address.value) : null

return {
...useVueDapp(),
provider: computed(() => ethersStore.provider),
signer: computed(() => ethersStore.signer),
address: computed(() => checksummedAddress),
balance: computed(() => ethersStore.balance),
setWallet: ethersStore.setWallet,
resetWallet: ethersStore.resetWallet,
Expand Down
2 changes: 0 additions & 2 deletions src/views/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,6 @@ import Referral from '../components/Referral.vue'
import useDomainHelpers from '../hooks/useDomainHelpers'
import useChainHelpers from '../hooks/useChainHelpers'
import MinterAbi from '../abi/Minter.json'
import erc20Abi from '../abi/Erc20.json'
import { storeToRefs } from 'pinia'
import { useVueDappModal } from '@vue-dapp/modal'
export default {
Expand Down
2 changes: 1 addition & 1 deletion src/views/Profile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ export default {
const intfc = new ethers.utils.Interface(tldAbi)
const contract = new ethers.Contract(this.getTldAddress, intfc, this.signer)
const checkDomainHolder = await contract.getDomainHolder(existingDomainParts[0])
if (String(checkDomainHolder) === String(this.address)) {
if (String(checkDomainHolder).toLowerCase() === String(this.address).toLowerCase()) {
this.addDomainManually(existingDomainLower)
this.toast('Domain successfully added.', { type: TYPE.SUCCESS })
} else {
Expand Down

0 comments on commit fefb2f5

Please sign in to comment.