Skip to content

Commit

Permalink
Merge pull request #258 from vechain/dev
Browse files Browse the repository at this point in the history
release v2.0.5
  • Loading branch information
qianbin authored Aug 29, 2022
2 parents b746fab + f5ab476 commit cc04218
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 5 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,15 @@ jobs:
- name: Rename file
run: mv ${{steps.sign_app.outputs.signedReleaseFile}} dist/cordova/android/apk/release/Sync2-android-${{ steps.vars.outputs.tag }}.apk

- name: Calculate checksum of output file
run: shasum -a 512 dist/cordova/android/apk/release/Sync2-android-${{ steps.vars.outputs.tag }}.apk | cut -f1 -d\ | xxd -r -p | base64 > dist/cordova/android/apk/release/Sync2-android-${{ steps.vars.outputs.tag }}-apk-SHASUM

- name: Upload released files
uses: softprops/action-gh-release@v1
with:
draft: true
files: |
dist/cordova/android/apk/release/Sync2-android-${{ steps.vars.outputs.tag }}.apk
dist/cordova/android/apk/release/Sync2-android-${{ steps.vars.outputs.tag }}-apk-SHASUM
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "org.vechain.sync2",
"version": "2.0.4",
"version": "2.0.5",
"description": "VeChain Sync2",
"productName": "Sync2",
"cordovaId": "org.vechain.sync2",
Expand Down
1 change: 1 addition & 0 deletions src/i18n/en-us/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ export default {
msg_invalid_request: 'Invalid request',
msg_fetch_request_failed: 'Unable to fetch request content',
msg_request_hash_mismatch: 'CAUTION: the request content is corrupted or tampered',
msg_fee_delegation: 'Fee will be paid by dApp',

// sign success
title_success: 'Success',
Expand Down
1 change: 1 addition & 0 deletions src/i18n/zh-cn/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ export default {
msg_invalid_request: '无效请求',
msg_fetch_request_failed: '无法获取请求内容',
msg_request_hash_mismatch: '注意: 请求内容已损坏或者被篡改',
msg_fee_delegation: '费用由应用支付',

// sign success
title_success: '成功',
Expand Down
4 changes: 3 additions & 1 deletion src/pages/Sign/GasFeeBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
<q-avatar size="1em">
<img src="~assets/vtho.svg">
</q-avatar>
<q-item-label v-if="isDelegation" caption>{{$t('sign.msg_fee_delegation')}}</q-item-label>
</q-item-label>
</q-item-section>
<q-item-section side>
Expand All @@ -33,7 +34,8 @@ import AmountLabel from 'src/components/AmountLabel.vue'
export default Vue.extend({
components: { AmountLabel },
props: {
fee: String
fee: String,
isDelegation: Boolean
}
})
</script>
7 changes: 5 additions & 2 deletions src/pages/Sign/TxDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
@click="showWarnings()"
/>

<gas-fee-bar :fee="fee">
<gas-fee-bar :fee="fee" :isDelegation="isDelegation">
<priority-selector
v-model="gasPriceCoef"
:calcFee="calcFee"
Expand Down Expand Up @@ -139,6 +139,9 @@ export default Common.extend({
this.energyWarning && ret.push(this.energyWarning)
return ret
},
isDelegation(): boolean {
return !!this.req.options.delegator
},
thor(): Connex.Thor { return this.$svc.bc(this.gid).thor },
estimation(): EstimateGasResult | null {
if (this.delayedEstimation && this.delayedEstimation.caller === this.signer) {
Expand Down Expand Up @@ -170,7 +173,7 @@ export default Common.extend({
async energyWarning(): Promise<Error | null> {
const est = this.estimation
const fee = this.fee
if (!est || !fee) {
if (!est || !fee || (this.req.options.delegator && !this.req.options.delegator.signer)) {
return null
}
const signer = this.signer
Expand Down

0 comments on commit cc04218

Please sign in to comment.