Compare commits

...
2 changed files with 11 additions and 6 deletions
+6 -3
View File
@@ -213,12 +213,15 @@ jobs:
./interstital-allow-update.sh ${new_hash}
git config --global user.email "vega-ci-bot@vega.xyz"
git config --global user.name "vega-ci-bot"
branch_name=${{ github.ref_name }}-hash-update
git checkout -b "${branch_name}"
git add interstitial-allow.json netlify.toml
commit_msg="feat(ci): Update CID for console release @ ${{ github.ref }}"
git commit -m "${commit_msg}"
# git push origin main
branch_name=${{ github.ref_name }}-hash-update
git checkout -b "${branch_name}"
git add interstitial-allow.json netlify.toml
git push -u origin "${branch_name}"
pr_url="$(gh pr create --title "${commit_msg}" --body 'update ipfs hash for console @ ${{ github.ref }}')"
echo $pr_url
gh pr merge --auto $pr_url
gh pr merge --admin --auto $pr_url
+5 -3
View File
@@ -1,5 +1,5 @@
import { ethers } from 'ethers';
import { hexlify } from 'ethers/lib/utils';
import { hexlify, toUtf8Bytes } from 'ethers/lib/utils';
import abi from '../abis/claim_abi.json';
import { calcGasBuffer } from '../utils';
@@ -70,7 +70,7 @@ export class Claim {
tranche,
expiry,
},
hexlify(country),
hexlify(toUtf8Bytes(country)),
target,
].filter(Boolean);
const res = await this.contract.estimateGas[method](...args);
@@ -110,7 +110,9 @@ export class Claim {
* @return {Promise<boolean>}
*/
async isCountryBlocked(country: string): Promise<boolean> {
const isAllowed = await this.contract.allowed_countries(hexlify(country));
const isAllowed = await this.contract.allowed_countries(
hexlify(toUtf8Bytes(country))
);
return !isAllowed;
}
}