-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chain release2.9 compatibility Grace Period and overdue (#3387)
* Refactor: add yarn to script to avoid errors * Feat: add some methods and interfaces - a method to get NU billing information - a method to get contract payment state - a method to get used resources by the node contract - some related interfaces * Feat: calculate unique name prcice * chore: inhance docstirng * Feat: support contract payment state calculations * Refactor: unlock contracts to use new overdue calculations * Refactor: enhance code readablity. reduce number of requests by passing the contract info to all chiled functions * chore: inhance imports * Refactor: unlock contracts - use proxy url in unlockMycontracts - refactor unlockContracts to accept array of contracts - add function to unlock contracts by their ids * add overdue details interfaces * chore: contract overdue - add function that takes only contract to unlock it - add calculate overdue functions * chore: expose get over due amount by the contract info only * fix: remove duplicated call * refactor: mUSD converter will return the price in mTFT fix unique name price calc fix imports * WIP: support overdue changes on contracts list in dashboard * refactor: fix unique name contract * wip fix calculations * feat: support Payment state - add contracts on rented node to the rent node overdue * chore: clean up * refactor: enhance contract lock state it is storing the rent contract on a map by the node id, and ignore the unwanted calculations * refactor: enhance contract lock unlock dialog now will check if the node contract on rented node or not; if so will retrive the rent contract cost and store the and will avoid duplication * refactor: fix is on rented node flag * refactor: call the associated rent contract on unlock rent contracts * feat: show the rent contract that will be unlocked as it is associated with selected contracts * Style: fix loading spinner in lock dialogs * fix: build * fix: passing contracts to client * docs: add deprecated annotation * return the contract cost whatever if it is on a rented node or not * docs: WIP adding docstrings * WIP: support unlock node contract if the associated rent contract is in created state * docs: WIP adding docstrings * cleanup: remove unused module * fix: build remove unused import * Chore: support unlock node contract if its rent contract is in created state * Chore: avoid bill same contract multiple times * Chore: use currency module to convert usd to tft * refactor: use the calculator module, remove the added pricing related interfaces and functions add helper method to convert from bytes to gb * chore: list all contracts to avoid default page size 50, add a function to work around that. * fix: build return if the contract list is empty * Chore: apply comments - fix typos - fix calculation in ipv4 cost - fix nu cost calaculations * Chore: support multiple ipv4 per contract * Chore: enahnce code readability separate node contracts on rented node cost calculations to multiple functions create constants with numbers repeatedly used in the calculations enhance docstring * Chore: fix typo fix build fix name convention * Fix: avoid having deleted rent contracts while listing rent contracts * Fix: pass CRU as number without conversion * Chore: add node extra fees to rent contract cost * refactor: include premuim price for certified nodes in the unbuiled nu * chore: set decimals to 7 in convert tft price * refactor: convert the monthly cost to avoid missing decimals on converting cost per second * fix: get total overdue skip the node contracts on rented nodes as it already calculated in rent contract * refactor: calculate node contract on rented node we were ignoring the elapsed seconds for node contracts and we assume that it is the same as rent contract * refactor reorder the calculation logic to be easier in debugging * refactor: pass the contracts by id as the contracts do not have the public_ips_number field * fix: reset total overdue on refresh * reset rentcontract on reset table * Fix: add premium price for ip price on rent node * Chore: remove unused functions * Chore: set to fixed point 15 and fix the error msg * Chore: include node contract on rented node in the getTotalOverDue function this will be needed for UI * Style: rephrase unlock dialog msg
- Loading branch information
Showing
13 changed files
with
733 additions
and
118 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
Oops, something went wrong.