Skip to content

Commit

Permalink
chore: Address review change requests
Browse files Browse the repository at this point in the history
  • Loading branch information
red-0ne committed Aug 14, 2024
1 parent f72e9bc commit 905f650
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions docusaurus/docs/operate/configs/supplier_staking_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ entry defined.

This field is useful if the `Supplier` owner wants to set a default revenue share
for all the `service`s entries that do not provide one. This way, the operator
does not have repeat the same values for each `service` in the `services` section.
does not have to repeat the same values for each `service` in the `services` section.

This map cannot be empty but can be omitted, in which case the default revenue
share falls back to `100%` of the rewards allocated to the `Supplier`'s `owner_address`.
Expand Down Expand Up @@ -217,7 +217,7 @@ share percentage.
It overrides the `default_rev_share_percent` if defined for the `service`.

This map cannot be empty but can be omitted, in which case it falls back to the
`default_rev_share_percent` top level configuration entry.
`default_rev_share_percent` top-level configuration entry.

:::note

Expand Down
2 changes: 1 addition & 1 deletion x/shared/helpers/service_configs.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ func ValidateSupplierServiceConfigs(services []*sharedtypes.SupplierServiceConfi

// ValidateServiceRevShare validates the supplier's service revenue share,
// ensuring that the sum of the revenue share percentages is 100.
// This function is unit tested via the supplier staking config tests.
// NB: This function is unit tested via the supplier staking config tests.
func ValidateServiceRevShare(revShareList []*sharedtypes.ServiceRevenueShare) error {
revSharePercentageSum := float32(0)

Expand Down
2 changes: 1 addition & 1 deletion x/supplier/config/supplier_configs_reader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,7 @@ func Test_ParseSupplierConfigs_Services(t *testing.T) {
expectedError: sharedtypes.ErrSharedInvalidRevShare,
},
{
desc: "empty rev share config",
desc: "errors when the rev share config is empty",
inputConfig: fmt.Sprintf(`
owner_address: %s
operator_address: %s
Expand Down
6 changes: 3 additions & 3 deletions x/supplier/types/message_stake_supplier_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ func TestMsgStakeSupplier_ValidateBasic(t *testing.T) {
desc: "missing owner address",
msg: MsgStakeSupplier{
Signer: ownerAddress,
// OwnerAddress: ownerAddress,
// OwnerAddress: ownerAddress, // intentionally commented out.
OperatorAddress: operatorAddress,
Stake: &sdk.Coin{Denom: volatile.DenomuPOKT, Amount: math.NewInt(100)},
Services: defaultServicesList,
Expand All @@ -134,7 +134,7 @@ func TestMsgStakeSupplier_ValidateBasic(t *testing.T) {
msg: MsgStakeSupplier{
Signer: ownerAddress,
OwnerAddress: ownerAddress,
// OperatorAddress: operatorAddress,
// OperatorAddress: operatorAddress, // intentionally commented out.
Stake: &sdk.Coin{Denom: volatile.DenomuPOKT, Amount: math.NewInt(0)},
Services: defaultServicesList,
},
Expand All @@ -143,7 +143,7 @@ func TestMsgStakeSupplier_ValidateBasic(t *testing.T) {
{
desc: "missing signer address",
msg: MsgStakeSupplier{
// Signer: ownerAddress,
// Signer: ownerAddress, // intentionally commented out.
OwnerAddress: ownerAddress,
OperatorAddress: operatorAddress,
Stake: &sdk.Coin{Denom: volatile.DenomuPOKT, Amount: math.NewInt(0)},
Expand Down
2 changes: 1 addition & 1 deletion x/tokenomics/keeper/token_logic_modules.go
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ func calculateGlobalMintAllocationFromSettlementAmount(
// shareholder based on the rev share percentage of the service.
// It returns a map of the shareholder address to the amount of uPOKT to distribute.
// The first shareholder gets any remainder due to floating point arithmetic.
// It is publically exposed to be used in the tests.
// NB: It is publically exposed to be used in the tests.
func GetShareAmountMap(
serviceRevShare []*sharedtypes.ServiceRevenueShare,
amountToDistribute uint64,
Expand Down

0 comments on commit 905f650

Please sign in to comment.