Skip to content

Commit

Permalink
sort table
Browse files Browse the repository at this point in the history
  • Loading branch information
Sladuca committed Sep 10, 2024
1 parent 1d3221f commit b8f32db
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/lib/buy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ async function tryToGetOrder(orderId: string) {
async function placeBuyOrderAction(options: SfBuyParamsNormalized) {
const api = await apiClient();
if (!options.priceCenticents) {
console.log("getting quote", options);
const { data, error, response } = await api.GET("/v0/quote", {
params: {
query: {
Expand Down
1 change: 1 addition & 0 deletions src/lib/orders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ interface ListResponseBody<T> {
}

function printAsTable(orders: Array<HydratedOrder>) {
orders.sort((a, b) => a.start_at.localeCompare(b.start_at));
const table = new Table({
head: [
"ID",
Expand Down

0 comments on commit b8f32db

Please sign in to comment.