Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

phi - correct wrap token address #5230

Merged
merged 3 commits into from
Dec 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading