Skip to content

Commit

Permalink
Merge branch 'master' into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
nutrina committed Apr 4, 2022
2 parents 222fbf5 + 8db185d commit 0933bdb
Show file tree
Hide file tree
Showing 37 changed files with 1,837 additions and 1,113 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,8 @@ jobs:
DB_PASSWORD: ${{ secrets.DB_PASSWORD }}
DB_USER: ${{ secrets.DB_USER }}
DOCKER_GTC_WEB_IMAGE: ${{ needs.build-and-test.outputs.dockerTag }}
GITHUB_API_USER: ${{ secrets.REVIEW_GITHUB_API_USER }}
GITHUB_API_TOKEN: ${{ secrets.REVIEW_GITHUB_API_TOKEN }}

# Pass in the outputs from the generic environment, we will deploy our ressources in the VPC
# and subnet that where created there
Expand Down
152 changes: 152 additions & 0 deletions app/app/fixtures/economy.json
Original file line number Diff line number Diff line change
Expand Up @@ -24373,5 +24373,157 @@
"metadata": {},
"approved": true
}
},
{
"model": "economy.token",
"pk": 365,
"fields": {
"created_on": "2022-04-04T06:28:03Z",
"modified_on": "2022-04-04T06:29:18.680Z",
"address": "0x0000000000000000000000000000000000000001",
"symbol": "ONE",
"network": "Harmony Mainnet Shard 0",
"decimals": 18,
"priority": 1,
"chain_id": 1666600000,
"network_id": 1666600000,
"metadata": {},
"approved": true,
"conversion_rate_id": "harmony",
"conversion_rate_source": "coingecko"
}
},
{
"model": "economy.token",
"pk": 366,
"fields": {
"created_on": "2022-04-04T06:28:03Z",
"modified_on": "2022-04-04T06:29:18.680Z",
"address": "0x0000000000000000000000000000000000000001",
"symbol": "ONE",
"network": "Harmony Mainnet Shard 1",
"decimals": 18,
"priority": 1,
"chain_id": 1666600001,
"network_id": 1666600001,
"metadata": {},
"approved": true,
"conversion_rate_id": "harmony",
"conversion_rate_source": "coingecko"
}
},
{
"model": "economy.token",
"pk": 367,
"fields": {
"created_on": "2022-04-04T06:28:03Z",
"modified_on": "2022-04-04T06:29:18.680Z",
"address": "0x0000000000000000000000000000000000000001",
"symbol": "ONE",
"network": "Harmony Mainnet Shard 2",
"decimals": 18,
"priority": 1,
"chain_id": 1666600002,
"network_id": 1666600002,
"metadata": {},
"approved": true,
"conversion_rate_id": "harmony",
"conversion_rate_source": "coingecko"
}
},
{
"model": "economy.token",
"pk": 368,
"fields": {
"created_on": "2022-04-04T06:29:18Z",
"modified_on": "2022-04-04T06:30:05.945Z",
"address": "0x0000000000000000000000000000000000000001",
"symbol": "ONE",
"network": "Harmony Mainnet Shard 3",
"decimals": 18,
"priority": 1,
"chain_id": 1666600003,
"network_id": 1666600003,
"metadata": {},
"approved": true,
"conversion_rate_id": "harmony",
"conversion_rate_source": "coingecko"
}
},
{
"model": "economy.token",
"pk": 369,
"fields": {
"created_on": "2022-04-04T06:29:18Z",
"modified_on": "2022-04-04T06:30:05.945Z",
"address": "0x0000000000000000000000000000000000000001",
"symbol": "ONE",
"network": "Harmony Testnet Shard 0",
"decimals": 18,
"priority": 1,
"chain_id": 1666700000,
"network_id": 1666700000,
"metadata": {},
"approved": true,
"conversion_rate_id": "harmony",
"conversion_rate_source": "coingecko"
}
},
{
"model": "economy.token",
"pk": 370,
"fields": {
"created_on": "2022-04-04T06:29:18Z",
"modified_on": "2022-04-04T06:30:05.945Z",
"address": "0x0000000000000000000000000000000000000001",
"symbol": "ONE",
"network": "Harmony Testnet Shard 1",
"decimals": 18,
"priority": 1,
"chain_id": 1666700001,
"network_id": 1666700001,
"metadata": {},
"approved": true,
"conversion_rate_id": "harmony",
"conversion_rate_source": "coingecko"
}
},
{
"model": "economy.token",
"pk": 371,
"fields": {
"created_on": "2022-04-04T06:29:18Z",
"modified_on": "2022-04-04T06:30:05.945Z",
"address": "0x0000000000000000000000000000000000000001",
"symbol": "ONE",
"network": "Harmony Testnet Shard 2",
"decimals": 18,
"priority": 1,
"chain_id": 1666700002,
"network_id": 1666700002,
"metadata": {},
"approved": true,
"conversion_rate_id": "harmony",
"conversion_rate_source": "coingecko"
}
},
{
"model": "economy.token",
"pk": 372,
"fields": {
"created_on": "2022-04-04T06:29:18Z",
"modified_on": "2022-04-04T06:30:05.945Z",
"address": "0x0000000000000000000000000000000000000001",
"symbol": "ONE",
"network": "Harmony Testnet Shard 3",
"decimals": 18,
"priority": 1,
"chain_id": 1666700003,
"network_id": 1666700003,
"metadata": {},
"approved": true,
"conversion_rate_id": "harmony",
"conversion_rate_source": "coingecko"
}
}
]
157 changes: 156 additions & 1 deletion app/assets/v2/js/data-chains.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// https://chainid.network/chains.json
// 20200603145449
// Note: information about harmony network have been appended on 20220330
var dataChains =
[
{
Expand Down Expand Up @@ -1293,7 +1294,161 @@ var dataChains =
"symbol": "MATIC",
"decimals": 18
},
"infoURL":"https://matic.network/"
"infoURL": "https://matic.network/"
},
{
"name": "Harmony Mainnet Shard 0",
"chain": "Harmony",
"rpc": [
"https://api.harmony.one"
],
"faucets": [
"https://free-online-app.com/faucet-for-eth-evm-chains/"
],
"nativeCurrency": {
"name": "ONE",
"symbol": "ONE",
"decimals": 18
},
"infoURL": "https://www.harmony.one/",
"shortName": "hmy-s0",
"chainId": 1666600000,
"networkId": 1666600000,
"explorers": [
{
"name": "Harmony Block Explorer",
"url": "https://explorer.harmony.one",
"standard": "EIP3091"
}
]
},
{
"name": "Harmony Mainnet Shard 1",
"chain": "Harmony",
"rpc": [
"https://s1.api.harmony.one"
],
"faucets": [],
"nativeCurrency": {
"name": "ONE",
"symbol": "ONE",
"decimals": 18
},
"infoURL": "https://www.harmony.one/",
"shortName": "hmy-s1",
"chainId": 1666600001,
"networkId": 1666600001
},
{
"name": "Harmony Mainnet Shard 2",
"chain": "Harmony",
"rpc": [
"https://s2.api.harmony.one"
],
"faucets": [],
"nativeCurrency": {
"name": "ONE",
"symbol": "ONE",
"decimals": 18
},
"infoURL": "https://www.harmony.one/",
"shortName": "hmy-s2",
"chainId": 1666600002,
"networkId": 1666600002
},
{
"name": "Harmony Mainnet Shard 3",
"chain": "Harmony",
"rpc": [
"https://s3.api.harmony.one"
],
"faucets": [],
"nativeCurrency": {
"name": "ONE",
"symbol": "ONE",
"decimals": 18
},
"infoURL": "https://www.harmony.one/",
"shortName": "hmy-s3",
"chainId": 1666600003,
"networkId": 1666600003
},
{
"name": "Harmony Testnet Shard 0",
"chain": "Harmony",
"rpc": [
"https://api.s0.b.hmny.io"
],
"faucets": [
"https://faucet.pops.one"
],
"nativeCurrency": {
"name": "ONE",
"symbol": "ONE",
"decimals": 18
},
"infoURL": "https://www.harmony.one/",
"shortName": "hmy-b-s0",
"chainId": 1666700000,
"networkId": 1666700000,
"explorers": [
{
"name": "Harmony Testnet Block Explorer",
"url": "https://explorer.pops.one",
"standard": "EIP3091"
}
]
},
{
"name": "Harmony Testnet Shard 1",
"chain": "Harmony",
"rpc": [
"https://api.s1.b.hmny.io"
],
"faucets": [],
"nativeCurrency": {
"name": "ONE",
"symbol": "ONE",
"decimals": 18
},
"infoURL": "https://www.harmony.one/",
"shortName": "hmy-b-s1",
"chainId": 1666700001,
"networkId": 1666700001
},
{
"name": "Harmony Testnet Shard 2",
"chain": "Harmony",
"rpc": [
"https://api.s2.b.hmny.io"
],
"faucets": [],
"nativeCurrency": {
"name": "ONE",
"symbol": "ONE",
"decimals": 18
},
"infoURL": "https://www.harmony.one/",
"shortName": "hmy-b-s2",
"chainId": 1666700002,
"networkId": 1666700002
},
{
"name": "Harmony Testnet Shard 3",
"chain": "Harmony",
"rpc": [
"https://api.s3.b.hmny.io"
],
"faucets": [],
"nativeCurrency": {
"name": "ONE",
"symbol": "ONE",
"decimals": 18
},
"infoURL": "https://www.harmony.one/",
"shortName": "hmy-b-s3",
"chainId": 1666700003,
"networkId": 1666700003
}
];

Expand Down
13 changes: 13 additions & 0 deletions app/assets/v2/js/pages/bounty_detail/web3_modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,19 @@ const payWithWeb3 = (fulfillment_id, fulfiller_address, vm, modal) => {
},
(error, result) => callback(error, result)
);
} else if (token_name == 'ONE') {
// Gas limit as indicated here: https://docs.harmony.one/home/general/wallets/browser-extensions-wallets/metamask-wallet/sending-and-receiving#sending-a-regular-transaction
web3.eth.sendTransaction(
{
to: fulfiller_address,
from: selectedAccount,
value: web3.utils.toWei(String(amount)),
gasPrice: web3.utils.toHex(30 * Math.pow(10, 9)),
gas: web3.utils.toHex(25000),
gasLimit: web3.utils.toHex(25000)
},
(error, result) => callback(error, result)
);
} else {

const amountInWei = amount * 1.0 * Math.pow(10, vm.decimals);
Expand Down
2 changes: 1 addition & 1 deletion app/assets/v2/js/pages/bounty_details.js
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ var callbacks = {
return [ 'fulfillment_accepted_on', timePeg ];
},
'network': function(key, val, result) {
if (val == 'mainnet') {
if (val.toLowerCase().indexOf('mainnet') >= 0) {
$('#network').addClass('hidden');
return [ null, null ];
}
Expand Down
5 changes: 1 addition & 4 deletions app/assets/v2/js/pages/bounty_details2.js
Original file line number Diff line number Diff line change
Expand Up @@ -571,6 +571,7 @@ Vue.mixin({

switch (payout_type) {
case 'web3_modal':
case 'harmony_ext':
payWithWeb3(fulfillment_id, fulfiller_address, vm, modal);
break;

Expand All @@ -582,10 +583,6 @@ Vue.mixin({
payWithBinanceExtension(fulfillment_id, fulfiller_address, vm, modal);
break;

case 'harmony_ext':
payWithHarmonyExtension(fulfillment_id, fulfiller_address, vm, modal);
break;

case 'rsk_ext':
payWithRSKExtension(fulfillment_id, fulfiller_address, vm, modal);
break;
Expand Down
Loading

0 comments on commit 0933bdb

Please sign in to comment.