Skip to content

Commit

Permalink
Merge pull request #5230 from swaponline/phiContracts_101223
Browse files Browse the repository at this point in the history
phi - correct wrap token address
  • Loading branch information
shendel authored Dec 11, 2023
2 parents 40602c9 + 35e531a commit ad2a9e2
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/common/helpers/constants/ADDRESSES.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const WrapperCurrency = {
1313161554: '0xc9bdeed33cd01541e1eed10f90519d2c06fe3feb',
4181: '0xb61d26717dbd2ea6ebf4fadae02a28782f86864c',
180: '0xCc9bD40124EfedF6F198B8b5b50697dC635FaaC4',
144: '0x587fe3Fdb7EcD6b134E1556A3Cd083ccF6e7f1B8', // phi-v2
144: '0x1278e0AdBc93291A54384594A9c27Da9f5890a9F', // phi-v2
40821: '0x325A2531D28e22D37935B65bd718D1244968dAae', // Fokawa (FKW)
// testnet
4: '0xc778417e063141139fce010982780140aa0cd5ab',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export default {
contractInteract: 200 * 1e3,
swap: 70 * 1e3,
},
price_fixed: 2,
price: {
slow: 2, //100,
normal: 2, //1000,
Expand Down
2 changes: 2 additions & 0 deletions src/common/helpers/ethLikeHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ class ethLikeHelper {
}

estimateGasPrice = async (): Promise<number> => {
if (this.defaultParams.price_fixed) return this.defaultParams.price_fixed

let response

try {
Expand Down
13 changes: 9 additions & 4 deletions src/front/shared/redux/actions/ethLikeAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -584,12 +584,17 @@ class EthLikeAction {

const Web3 = this.getCurrentWeb3()

const codeAtAddress = await Web3.eth.getCode(address)
const codeIsEmpty = !codeAtAddress || codeAtAddress === '0x' || codeAtAddress === '0x0'
try {
const codeAtAddress = await Web3.eth.getCode(address)

const codeIsEmpty = !codeAtAddress || codeAtAddress === '0x' || codeAtAddress === '0x0'

contractsList[lowerAddress] = !codeIsEmpty
contractsList[lowerAddress] = !codeIsEmpty

return !codeIsEmpty
return !codeIsEmpty
} catch (err) {
return false
}
}
}

Expand Down

0 comments on commit ad2a9e2

Please sign in to comment.