Skip to content

Commit

Permalink
refactor: upgrades quais sdk to 1.0.0-alfa.9
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelKostroma committed Sep 20, 2024
1 parent d6cd33f commit 970a6de
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 3 deletions.
2 changes: 1 addition & 1 deletion background/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"dexie": "^3.0.3",
"emittery": "^0.9.2",
"lodash": "^4.17.21",
"quais": "^1.0.0-alpha.8",
"quais": "^1.0.0-alpha.9",
"sinon": "^14.0.0",
"siwe": "^1.1.0",
"util": "^0.12.4",
Expand Down
8 changes: 6 additions & 2 deletions background/services/chain/types/quai-transaction-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ import {
} from "quais"
import { QuaiTransactionRequest } from "quais/lib/commonjs/providers"
import { QuaiTransactionLike } from "quais/lib/commonjs/transaction/quai-transaction"
import { QuaiTransactionResponseParams } from "quais/lib/commonjs/providers/formatting"
import {
EtxParams,
QuaiTransactionResponseParams,
} from "quais/lib/commonjs/providers/formatting"

import { TransactionAnnotation } from "../../enrichment"
import { NetworkInterface } from "../../../constants/networks/networkTypes"
Expand Down Expand Up @@ -75,8 +78,9 @@ export type SerializedTransactionForHistory = {
value: BigNumberish | null | undefined
index: bigint
blockNumber: number | null
etxs: ReadonlyArray<string>
etxs: readonly EtxParams[]
gasPrice: BigNumberish | null | undefined
logs: ReadonlyArray<LogParams>
gasUsed?: bigint | null
etxType: string | null
}
4 changes: 4 additions & 0 deletions background/services/chain/utils/quai-transactions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ export const createSerializedQuaiTransaction = (
gasPrice,
logs: [],
gasUsed: undefined,
etxType: null,
}

case QuaiTransactionStatus.PENDING:
Expand Down Expand Up @@ -139,6 +140,7 @@ export const createSerializedQuaiTransaction = (
gasPrice,
logs: [],
gasUsed: undefined,
etxType: transaction?.etxType ?? null,
}

case QuaiTransactionStatus.CONFIRMED:
Expand All @@ -164,6 +166,7 @@ export const createSerializedQuaiTransaction = (
gasPrice,
logs: transaction?.logs,
gasUsed: transaction?.gasPrice,
etxType: null,
}

default:
Expand All @@ -189,6 +192,7 @@ export const createSerializedQuaiTransaction = (
gasPrice: undefined,
logs: [],
gasUsed: undefined,
etxType: null,
}
}
}
14 changes: 14 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7315,6 +7315,20 @@ quais@^1.0.0-alpha.8:
tslib "^2.6.2"
ws "^8.17.1"

quais@^1.0.0-alpha.9:
version "1.0.0-alpha.9"
resolved "https://registry.yarnpkg.com/quais/-/quais-1.0.0-alpha.9.tgz#8a20d7e77b9a37603aa06374af3e6e69ca992cbc"
integrity sha512-Vlho+KVnKTlTkHmqS+u2IKCVjwBZk+FAL2FYMVcH+MqEwh1VrQq1NHDLCiv/GfyeBZhNKkojXGyNxw6J0lAyaw==
dependencies:
"@brandonblack/musig" "^0.0.1-alpha.1"
"@noble/curves" "1.2.0"
"@noble/hashes" "1.3.2"
aes-js "4.0.0-beta.5"
dotenv "^16.4.1"
google-protobuf "^3.21.4"
tslib "^2.6.2"
ws "^8.17.1"

querystring@0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620"
Expand Down

0 comments on commit 970a6de

Please sign in to comment.