Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
run: pnpm install

- name: Connect Tailscale
uses: tailscale/github-action@v2
uses: tailscale/github-action@v4
with:
oauth-client-id: ${{ secrets.TS_OAUTH_CLIENT_ID }}
oauth-secret: ${{ secrets.TS_OAUTH_SECRET }}
Expand Down
8 changes: 4 additions & 4 deletions packages/core/src/__tests__/typesSierra.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -497,19 +497,19 @@ describe("projectBilling", () => {
.setOrgId(orgId)
.setProjectId(projectId)
.setCurrency("USD")
.setDailyBudgetUsd(25.5);
.setDailyBudget(25.5);

expect(converter.projectBilling()(response).dailyBudgetUsd).toBe(25.5);
expect(converter.projectBilling()(response).dailyBudget).toBe(25.5);
});

test("zero budget is a budget", () => {
const response = new sierra_message_pb.ProjectBilling()
.setOrgId(orgId)
.setProjectId(projectId)
.setCurrency("USD")
.setDailyBudgetUsd(0);
.setDailyBudget(0);

expect(converter.projectBilling()(response)).toHaveProperty("dailyBudgetUsd", 0);
expect(converter.projectBilling()(response)).toHaveProperty("dailyBudget", 0);
});
});

Expand Down
9 changes: 5 additions & 4 deletions packages/core/src/typesSierra.ts
Original file line number Diff line number Diff line change
Expand Up @@ -371,10 +371,11 @@ export interface ProjectBilling {
*/
currency: string;
/**
* The most the project may spend in a UTC day, in USD at list price, before it's disabled until the day ends.
* The most the project may spend in a UTC day, in the project's `currency` at list price, before it's disabled until
* the day ends.
* Not set means no budget.
*/
dailyBudgetUsd?: number;
dailyBudget?: number;
}

/**
Expand Down Expand Up @@ -799,8 +800,8 @@ export class ConvertSierra {
currency: response.getCurrency(),
};
// an `optional` field, so zero is a valid budget, and only an absent one means no budget
if (response.hasDailyBudgetUsd()) {
result.dailyBudgetUsd = response.getDailyBudgetUsd();
if (response.hasDailyBudget()) {
result.dailyBudget = response.getDailyBudget();
}
return result;
};
Expand Down
2 changes: 1 addition & 1 deletion packages/node/src/__integration-tests__/blockchain.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ describe('BlockchainClient', () => {
payload: ['0x1', false],
},
{
id: 1,
id: 2,
method: 'eth_gasPrice',
payload: [],
},
Expand Down
2 changes: 1 addition & 1 deletion packages/web/src/__integration-tests__/market.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { EmeraldApi } from "../EmeraldApi";
import { Blockchain } from "@emeraldpay/api";

jest.setTimeout(5000);
jest.setTimeout(30000);

describe("MarketClient", () => {
let api: EmeraldApi;
Expand Down
Loading