Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/update maxTimeBeforeInvoice limit #157

Merged
merged 1 commit into from
Apr 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
}
peeech marked this conversation as resolved.
Show resolved Hide resolved

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
Loading