Skip to content

Commit 95c3f01

Browse files
committed
address comments
1 parent ed6c7bf commit 95c3f01

File tree

2 files changed

+772
-612
lines changed

2 files changed

+772
-612
lines changed

apps/price_pusher/src/ton/ton.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export class TonPricePusher implements IPricePusher {
7979
const keyPair = keyPairFromSeed(Buffer.from(this.privateKey, "hex"));
8080
const wallet = WalletContractV4.create({
8181
publicKey: keyPair.publicKey,
82-
workchain: 0,
82+
workchain: 0, // workchain 0 is the masterchain
8383
});
8484
const provider = this.client.open(wallet);
8585
this.sender = provider.sender(keyPair.secretKey);
@@ -109,7 +109,8 @@ export class TonPricePusher implements IPricePusher {
109109
const updateDataBuffer = Buffer.from(updateData, "base64");
110110
const updateFee = await this.contract.getUpdateFee(updateDataBuffer);
111111
const totalFee =
112-
calculateUpdatePriceFeedsFee(BigInt(updateFee)) + BigInt(updateFee);
112+
calculateUpdatePriceFeedsFee(BigInt(priceIds.length)) +
113+
BigInt(updateFee);
113114

114115
await this.contract.sendUpdatePriceFeeds(
115116
this.sender,

0 commit comments

Comments
 (0)