Skip to content

Commit

Permalink
Merge pull request #157 from Holo-Host/feature/jurisdiction-updates
Browse files Browse the repository at this point in the history
Fix/update maxTimeBeforeInvoice limit
  • Loading branch information
mateuszRybczonek authored Apr 16, 2024
2 parents 68b3207 + d55d5d9 commit 9205a1a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/store/preferences.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ export const usePreferencesStore = defineStore('preferences', {

// NB: 18446744073709551615 is the max u64 number, which is the required type for `max_time_before_invoice.secs`
// Number should never need to exceed this amount.
if (maxTimeBeforeInvoice > 18446744073709551615) {
maxTimeBeforeInvoice = 18446744073709551615
}
if (maxTimeBeforeInvoice > 18446744073709550000) {
maxTimeBeforeInvoice = 18446744073709550000
}

const payload: DefaultPreferencesPayload = {
price_compute: `${this.pricesSettings.cpu}`,
Expand All @@ -58,7 +58,7 @@ export const usePreferencesStore = defineStore('preferences', {
max_fuel_before_invoice: `${this.invoicesSettings.frequency.amount}`,
max_time_before_invoice: {
secs: maxTimeBeforeInvoice,
nanos: 0,
nanos: 0
},
invoice_due_in_days: invoiceDuePeriod,
jurisdiction_prefs: {
Expand Down

0 comments on commit 9205a1a

Please sign in to comment.