Skip to content

Commit

Permalink
refactor(renterd): remove allowance
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfreska committed Nov 19, 2024
1 parent ecec83f commit c7b3517
Show file tree
Hide file tree
Showing 51 changed files with 1,126 additions and 1,633 deletions.
5 changes: 5 additions & 0 deletions .changeset/big-sloths-wave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@siafoundation/design-system': minor
---

SiacoinField border is no longer blue in readOnly state.
5 changes: 5 additions & 0 deletions .changeset/few-bottles-shop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'walletd': minor
---

The wallet balance is now refreshed at least every 15 seconds.
5 changes: 5 additions & 0 deletions .changeset/happy-scissors-approve.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@siafoundation/design-system': minor
---

SiacoinField now has a unitsFiatPostfix prop.
5 changes: 5 additions & 0 deletions .changeset/selfish-books-jog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@siafoundation/renterd-types': minor
---

Allowance was removed from autopilot contracts config API.
5 changes: 5 additions & 0 deletions .changeset/silent-llamas-explode.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'renterd': minor
---

The allowance fitting and price fitting features were removed.
5 changes: 5 additions & 0 deletions .changeset/sixty-fireants-kick.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'renterd': minor
---

The configuration page has a new spending estimate widget that includes an option to rebalance prices within the current estimate.
5 changes: 5 additions & 0 deletions .changeset/wet-planets-pull.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@siafoundation/renterd-types': minor
---

The autopilots key was removed from the pinned settings API.
5 changes: 5 additions & 0 deletions .changeset/wise-rabbits-film.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'renterd': minor
---

The allowance concept was removed.
2 changes: 1 addition & 1 deletion apps/hostd-e2e/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export default defineConfig({
video: 'on-first-retry',
},
// Timeout per test.
timeout: 120_000,
timeout: 180_000,
expect: {
// Raise the timeout because it is running against next dev mode
// which requires compilation the first to a page is visited
Expand Down
2 changes: 1 addition & 1 deletion apps/renterd-e2e/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export default defineConfig({
video: 'on-first-retry',
},
// Timeout per test. The cluster takes up to 30 seconds to start and form contracts.
timeout: 120_000,
timeout: 180_000,
expect: {
// Raise the timeout because it is running against next dev mode
// which requires compilation the first to a page is visited.
Expand Down
36 changes: 26 additions & 10 deletions apps/renterd-e2e/src/fixtures/configResetSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ export const configResetAllSettings = step(
await fillTextInputByName(page, 'storageTB', '1')
await fillTextInputByName(page, 'uploadTBMonth', '1')
await fillTextInputByName(page, 'downloadTBMonth', '1')
await setSwitchByLabel(page, 'shouldPinAllowance', true)
await fillTextInputByName(page, 'allowanceMonthPinned', '10')
await setSwitchByLabel(page, 'shouldPinAllowance', false)
await fillTextInputByName(page, 'allowanceMonth', '21000')
await fillTextInputByName(page, 'periodWeeks', '6')
await fillTextInputByName(page, 'renewWindowWeeks', '2')
await fillTextInputByName(page, 'amountHosts', '3')
Expand Down Expand Up @@ -85,18 +81,20 @@ export const configResetAllSettings = step(

export const configResetBasicSettings = step(
'config reset basic settings',
async ({ page }: { page: Page }) => {
async (page: Page) => {
await navigateToConfig({ page })
await setViewMode({ page, state: 'basic' })
await setViewMode({ page, state: 'advanced' })

await fillTextInputByName(page, 'storageTB', '7')
await fillTextInputByName(page, 'uploadTBMonth', '7')
await fillTextInputByName(page, 'downloadTBMonth', '7')
await fillTextInputByName(page, 'allowanceMonth', '1000')

await fillTextInputByName(page, 'maxStoragePriceTBMonth', '3000')
await fillTextInputByName(page, 'maxUploadPriceTB', '3000')
await fillTextInputByName(page, 'maxDownloadPriceTB', '3000')
await configFillEstimatesSiacoin(page)

await fillTextInputByName(page, 'minShards', '1')
await fillTextInputByName(page, 'totalShards', '3')

await setViewMode({ page, state: 'basic' })

// save
await clickIfEnabledAndWait(
Expand All @@ -106,3 +104,21 @@ export const configResetBasicSettings = step(
await clearToasts({ page })
}
)

export const configFillEstimatesSiacoin = step(
'config fill estimates and prices',
async (page: Page) => {
await fillTextInputByName(page, 'maxStoragePriceTBMonth', '3000')
await fillTextInputByName(page, 'maxUploadPriceTB', '3000')
await fillTextInputByName(page, 'maxDownloadPriceTB', '3000')
}
)

export const configFillEstimatesFiat = step(
'config fill estimates fiat',
async (page: Page) => {
await fillTextInputByName(page, 'maxStoragePriceTBMonthPinned', '11.832136')
await fillTextInputByName(page, 'maxUploadPriceTBPinned', '11.832136')
await fillTextInputByName(page, 'maxDownloadPriceTBPinned', '11.832136')
}
)
Loading

0 comments on commit c7b3517

Please sign in to comment.