From 1d50215b643a134205ebcc34807dac71b079ac17 Mon Sep 17 00:00:00 2001 From: Leonard Mocanu Date: Mon, 14 Oct 2024 18:27:15 +0300 Subject: [PATCH] Reapply "delegation: changes default commission for node creation" This reverts commit 793571683397a8a3764858ab18e93d049ef22a18. --- .../delegation/src/modules/blockchain/blockchain.module.ts | 2 ++ .../delegation/src/modules/blockchain/blockchain.service.ts | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/services/delegation/src/modules/blockchain/blockchain.module.ts b/services/delegation/src/modules/blockchain/blockchain.module.ts index 55f18ff1d..942aa16bf 100644 --- a/services/delegation/src/modules/blockchain/blockchain.module.ts +++ b/services/delegation/src/modules/blockchain/blockchain.module.ts @@ -22,6 +22,7 @@ const getProviders = () => [ ethereum.testnetWallet, delegation.testnetDelegation, delegation.testnetOwnNodes, + 10000, ); }, inject: [delegationConfig.KEY, ethereumConfig.KEY], @@ -37,6 +38,7 @@ const getProviders = () => [ ethereum.mainnetWallet, delegation.minDelegation, [], + 0, ); }, inject: [delegationConfig.KEY, ethereumConfig.KEY], diff --git a/services/delegation/src/modules/blockchain/blockchain.service.ts b/services/delegation/src/modules/blockchain/blockchain.service.ts index a2fe28ef7..db2b64e48 100644 --- a/services/delegation/src/modules/blockchain/blockchain.service.ts +++ b/services/delegation/src/modules/blockchain/blockchain.service.ts @@ -13,6 +13,7 @@ export class BlockchainService { public defaultDelegationAmount: ethers.BigNumber, private ownNodes: string[], private txCount = 0, + private defaultCommission = 0, ) { this.provider = new ethers.providers.JsonRpcProvider({ url: endpoint, @@ -41,12 +42,14 @@ export class BlockchainService { walletKey: string, defaultDelegationAmount: ethers.BigNumber, ownNodes: string[], + defaultCommission: number, ) { return new BlockchainService( endpoint, walletKey, defaultDelegationAmount, ownNodes, + defaultCommission, ); } @@ -83,7 +86,7 @@ export class BlockchainService { address, addressProof, vrfKey, - 0, + this.defaultCommission, '', '', {