diff --git a/CI/bun.lockb b/CI/bun.lockb index a257cc8..05ebc05 100644 Binary files a/CI/bun.lockb and b/CI/bun.lockb differ diff --git a/CI/package.json b/CI/package.json index 077da12..f65e055 100644 --- a/CI/package.json +++ b/CI/package.json @@ -9,7 +9,7 @@ "typescript": "^5.0.0" }, "dependencies": { - "farcaster-hub-utils": "^0.1.7", + "farcaster-hub-utils": "^0.1.8", "yup-api-interact": "^0.1.6" }, "license": "MIT" diff --git a/package.json b/package.json index 8af239e..3702764 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "clear-wallet", - "version": "1.4.3", + "version": "1.4.4", "private": true, "description": "Clear Wallet (CLW) is a wallet that helps you manage your Ethereum assets and interact with Ethereum dApps and contracts with the main focus on absolute privacy.", "type": "module", @@ -10,6 +10,7 @@ "content": "tsc --outFile src/extension/content.js src/extension/content.ts", "post-build": "yarn tsx ./release-scripts/post-build.ts", "build": "yarn inject && yarn content && vue-tsc --noEmit && vite build && yarn post-build", + "rebuild": "yarn build && yarn tsx ./release-scripts/create-release.ts rebuild", "preview": "vite preview", "release": "yarn config set version-tag-prefix clear-wallet@v && yarn config set version-git-message 'clear-wallet@v%s' && yarn version --patch && yarn postversion", "postversion": "git push", diff --git a/release-scripts/create-release.ts b/release-scripts/create-release.ts index beaf3ee..78cbf0f 100644 --- a/release-scripts/create-release.ts +++ b/release-scripts/create-release.ts @@ -1,10 +1,10 @@ const pFs = import('fs') -const pCps = import ('child_process') +const pCps = import('child_process') -async function ghRelease(changes: string[]) { +async function ghRelease (changes: string[], isRebuild: boolean) { const fs = (await pFs).default - if (!fs.existsSync('releases')){ + if (!fs.existsSync('releases')) { fs.mkdirSync('releases'); } @@ -32,29 +32,31 @@ async function ghRelease(changes: string[]) { arch.finalize(); }); - const changeLogPath = `releases/${pkg.version}.changelog.md`; + if (!isRebuild) { + const changeLogPath = `releases/${pkg.version}.changelog.md`; - fs.writeFileSync( - changeLogPath, - `# ${pkg.version} \n + fs.writeFileSync( + changeLogPath, + `# ${pkg.version} \n ${changes.reduce((acc: string, change: string) => { - return acc + `- ${change}\n`; - }, '')}`, - ); - const cps = (await pCps) - console.log( - await new Promise((resolve) => { - const p = cps.spawn('gh', ['release', 'create', `v${pkg.version}`, `./${outputPath}`, '-F', `./${changeLogPath}`], { - shell: true, - }); - let result = ''; - p.stdout.on('data', (data) => (result += data.toString())); - p.stderr.on('data', (data) => (result += data.toString())); - p.on('close', () => { - resolve(result); - }); - }), - ); + return acc + `- ${change}\n`; + }, '')}`, + ); + const cps = (await pCps) + console.log( + await new Promise((resolve) => { + const p = cps.spawn('gh', ['release', 'create', `v${pkg.version}`, `./${outputPath}`, '-F', `./${changeLogPath}`], { + shell: true, + }); + let result = ''; + p.stdout.on('data', (data) => (result += data.toString())); + p.stderr.on('data', (data) => (result += data.toString())); + p.on('close', () => { + resolve(result); + }); + }), + ); + } } (async () => { @@ -63,6 +65,9 @@ async function ghRelease(changes: string[]) { return; } const changes = process.argv[2].split(','); - await ghRelease(changes); + + const isRebuild = changes.includes('rebuild'); + + await ghRelease(changes, isRebuild); console.log('Release created', changes); })(); diff --git a/src/extension/manifest.json b/src/extension/manifest.json index 1532057..61df0bc 100644 --- a/src/extension/manifest.json +++ b/src/extension/manifest.json @@ -3,8 +3,8 @@ "name": "__MSG_appName__", "description": "__MSG_appDesc__", "default_locale": "en", - "version": "1.4.3", - "version_name": "1.4.3", + "version": "1.4.4", + "version_name": "1.4.4", "icons": { "16": "assets/extension-icon/wallet_16.png", "32": "assets/extension-icon/wallet_32.png", diff --git a/src/views/SignTx.vue b/src/views/SignTx.vue index 65c728b..b20edb5 100644 --- a/src/views/SignTx.vue +++ b/src/views/SignTx.vue @@ -127,7 +127,7 @@ > - Set Price + Set Limit @@ -399,16 +399,16 @@ export default defineComponent({ interval = setInterval(setItervalFn, 1000) as any; }); - const setGasLimit = () => { + const setGasLimit = async () => { gasLimit.value = inGasLimit.value; - newGasData(); + await newGasData(); gasLimitModal.value = false; }; - const setGasPrice = () => { + const setGasPrice = async () => { gasPrice.value = inGasPrice.value; gasPriceReFetch.value = false; - newGasData(); + await newGasData(); gasPriceModal.value = false; };