Skip to content

Commit d102d01

Browse files
authored
Merge pull request #252 from OriginTrail/add-auto-merge-workflow
Add auto merge workflow
2 parents f963d47 + dfc08b0 commit d102d01

File tree

4 files changed

+18
-7
lines changed

4 files changed

+18
-7
lines changed

.github/workflows/auto-merge-main-to-Test_Publish_Query.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,15 @@ on:
44
push:
55
branches:
66
- v8/develop
7+
pull_request:
8+
branches:
9+
- v8/develop
10+
types:
11+
- closed
712

813
jobs:
914
merge-develop-into-feature:
15+
if: github.event.pull_request.merged == true || github.event_name == 'push'
1016
runs-on: ubuntu-latest
1117

1218
steps:
@@ -25,7 +31,8 @@ jobs:
2531
run: git fetch origin v8/develop
2632

2733
- name: Merge v8/develop into Test_Publish_Query
28-
run: git merge origin/v8/develop --no-edit || true
34+
run: |
35+
git merge origin/v8/develop --no-edit || echo "Merge failed but continuing"
2936
3037
- name: Push updated branch
3138
run: git push origin HEAD:Test_Publish_Query

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,7 @@ kg-example.json
1313

1414
client-d-n.html
1515
client-d-n.js
16+
assets
17+
mainnet_base.html
18+
mainnet_base.json
19+
mochawesome-report

index.cjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3445,8 +3445,8 @@ class BlockchainServiceBase {
34453445
async getGnosisGasPrice(blockchain) {
34463446
try {
34473447
const response = await axios.get(blockchain.gasPriceOracleLink);
3448-
const averageGasPrice = Number(response?.data?.average) * 1e9;
3449-
return averageGasPrice || DEFAULT_GAS_PRICE_WEI.GNOSIS;
3448+
const fastGasPrice = Number(response?.data?.fast) * 1e9;
3449+
return fastGasPrice || DEFAULT_GAS_PRICE_WEI.GNOSIS;
34503450
} catch (error) {
34513451
console.warn(`Failed to fetch gas price from Gnosis oracle: ${error}`);
34523452
return DEFAULT_GAS_PRICE_WEI.GNOSIS;
@@ -4613,7 +4613,7 @@ class BlockchainServiceBase {
46134613
if (blockchain.name.split(':')[1] === '100') {
46144614
gasPrice = Number(response.result, 10);
46154615
} else if (blockchain.name.split(':')[1] === '10200') {
4616-
gasPrice = Math.round(response.data.average * 1e9);
4616+
gasPrice = Math.round((response.data.fast) * 1e9);
46174617
}
46184618
} else {
46194619
gasPrice = Web3.utils.toWei(

services/blockchain-service/blockchain-service-base.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,8 @@ export default class BlockchainServiceBase {
140140
async getGnosisGasPrice(blockchain) {
141141
try {
142142
const response = await axios.get(blockchain.gasPriceOracleLink);
143-
const averageGasPrice = Number(response?.data?.average) * 1e9;
144-
return averageGasPrice || DEFAULT_GAS_PRICE_WEI.GNOSIS;
143+
const fastGasPrice = Number(response?.data?.fast) * 1e9;
144+
return fastGasPrice || DEFAULT_GAS_PRICE_WEI.GNOSIS;
145145
} catch (error) {
146146
console.warn(`Failed to fetch gas price from Gnosis oracle: ${error}`);
147147
return DEFAULT_GAS_PRICE_WEI.GNOSIS;
@@ -1308,7 +1308,7 @@ export default class BlockchainServiceBase {
13081308
if (blockchain.name.split(':')[1] === '100') {
13091309
gasPrice = Number(response.result, 10);
13101310
} else if (blockchain.name.split(':')[1] === '10200') {
1311-
gasPrice = Math.round(response.data.average * 1e9);
1311+
gasPrice = Math.round((response.data.fast) * 1e9);
13121312
}
13131313
} else {
13141314
gasPrice = Web3.utils.toWei(

0 commit comments

Comments
 (0)