-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: undefined in first time agent running notification
- Loading branch information
Atatakai
authored and
Atatakai
committed
Jul 17, 2024
1 parent
45baebf
commit fb7efcb
Showing
6 changed files
with
36 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { ServiceTemplate } from "@/client"; | ||
import { formatUnits } from "ethers/lib/utils"; | ||
|
||
export const getMinimumStakedAmountRequired = (serviceTemplate: ServiceTemplate) => { | ||
const olasCostOfBond = Number( | ||
formatUnits(`${serviceTemplate.configuration.olas_cost_of_bond}`, 18) | ||
); | ||
const olasRequiredToStake = Number( | ||
formatUnits(`${serviceTemplate.configuration.olas_required_to_stake}`, 18) | ||
); | ||
|
||
return olasCostOfBond + olasRequiredToStake; | ||
}; |