Skip to content

Commit b6c3dab

Browse files
authored
Jayb/fix more (#100)
* fix chainid problem * bump version
1 parent 72d0ad1 commit b6c3dab

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

composes/docker-compose.common.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ services:
55
context: ../
66
dockerfile: ./Dockerfile
77
environment:
8-
VERSION: v2.1.3
8+
VERSION: v2.1.4

config/prod/chainIds.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@ module.exports = {
77
METADIUM: "0xcede49e6cd419f5b9cbd2bb538ab0094cde0294b9c81ba79f2fe60ee3b81196e",
88
SILICON: "0x738959fe9c00c831e32f667ad0ad87fb56305c649e3056e146eb76e4e63f27a3",
99
WEMIX: "0x5560fdf32b99e139147611cfafb3bbf93294e3ac776977c78617aea67bcc93b3",
10-
TON_LAYER_1: "0x7fbf8c6a40d71b9a23ab3fe0cf9020cca506716634e0178a4fc087899130a6b0"
11-
}
10+
TON_LAYER_1: "0x7fbf8c6a40d71b9a23ab3fe0cf9020cca506716634e0178a4fc087899130a6b0",
11+
TON: "0x57643076c3a92f82c3fea3dd79d4cfdfa8b938157ec73abcf2abfffb3de56f5a",
12+
}

src/ton/index.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ class TONValidator {
157157
uints: [result.amount, result.decimals, result.depositId, result.lt], // result.lt?
158158
data: result.data || '0x'
159159
};
160-
160+
161161
const tonMinter = this.tonMinter;
162162
const ton = this.ton;
163163

@@ -386,8 +386,8 @@ class TONValidator {
386386
await valid(params, chainIds, this.orbitHub);
387387

388388
async function valid(data, chainIds, orbitHubAddress) {
389-
let fromChainId = chainIds[data.fromChain.toLowerCase()];
390-
let toChainId = chainIds[data.toChain.toLowerCase()];
389+
let fromChainId = chainIds[data.fromChain.toUpperCase()];
390+
let toChainId = chainIds[data.toChain.toUpperCase()];
391391
if(!fromChainId || !toChainId){
392392
logger.ton.error(`Cannot get chainId. ${data.fromChain}, ${data.toChain}`);
393393
return;
@@ -425,12 +425,12 @@ class TONValidator {
425425
}
426426
}
427427
}
428-
428+
429429
let ecSig = Britto.signMessage(hash, validator.pk);
430430
let edSig = Britto.signEd25519(hash, validator.pk);
431431
let sigs = TONValidator.makeSigsWithED(validator.address, ecSig, edSig);
432432
sigs[1] = parseInt(sigs[1],16)
433-
433+
434434
await api.validator.post(`/governance/validate`, {
435435
from_chain: data.fromChain,
436436
to_chain: data.toChain,
@@ -449,7 +449,7 @@ class TONValidator {
449449
ed_r: sigs[4],
450450
ed_s: sigs[5]
451451
});
452-
452+
453453
hashMap.set(hash.toString('hex').add0x(), {
454454
txHash: hash,
455455
timestamp: parseInt(Date.now() / 1000),

0 commit comments

Comments
 (0)