Skip to content

chore: upgrade wallet-lib to v2.1.1 #222

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

Open
wants to merge 33 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
db47830
chore: upgrade wallet-lib to v2.1.1
r4mmer Mar 25, 2025
925d526
chore: upgrade yarn lock
r4mmer Mar 25, 2025
ccd1daf
feat: turn authorities into bigint to compare with lib consts
r4mmer Mar 27, 2025
6c2eabe
feat: use node22
r4mmer Mar 27, 2025
4916bd3
feat: change bigint support config on mysql client
r4mmer Mar 28, 2025
d684a44
feat: add database support for bigint with type changes and error fixes
r4mmer Mar 31, 2025
6dcf051
tests: fix issues caused by bigint support and typing
r4mmer Mar 31, 2025
332944c
chore: lockfile updates
r4mmer Mar 31, 2025
039b984
tests(daemon): expect bigint values
r4mmer Apr 1, 2025
004f851
tests: expect bigint values
r4mmer Apr 1, 2025
fd9d9cf
tests: use JSONBigInt where applicabel
r4mmer Apr 1, 2025
355d2de
tests: expect bigint values
r4mmer Apr 1, 2025
bd8b013
Merge remote-tracking branch 'origin/master' into feat/upgrade-wallet…
r4mmer Apr 2, 2025
6f5dc26
tests: expect bigint values
r4mmer Apr 2, 2025
d81149c
tests: expect bigint values
r4mmer Apr 2, 2025
712b0c5
Merge remote-tracking branch 'origin/master' into feat/upgrade-wallet…
r4mmer Apr 7, 2025
e392fd0
chore: lock update
r4mmer Apr 7, 2025
859b795
Merge remote-tracking branch 'origin/master' into feat/upgrade-wallet…
r4mmer Apr 7, 2025
2fa0a74
Merge remote-tracking branch 'origin/master' into feat/upgrade-wallet…
r4mmer Apr 7, 2025
2165e49
chore: lock update
r4mmer Apr 7, 2025
496866e
Merge remote-tracking branch 'origin/master' into feat/upgrade-wallet…
r4mmer Apr 8, 2025
8e53fe9
chore: parse using JSONbigint
r4mmer Apr 8, 2025
b2f7e70
chore: parse using JSONbigint
r4mmer Apr 8, 2025
687cf2c
chore: parse using JSONbigint
r4mmer Apr 8, 2025
68d9c3e
chore: add bigint values instead of strings
r4mmer Apr 8, 2025
058aa51
chore: parse websocket event
r4mmer Apr 8, 2025
cf9d64c
feat: add zod schema to daemon
r4mmer Apr 8, 2025
4c4db9f
chore: convert to bigint values
r4mmer Apr 9, 2025
792d404
chore: fix zod schema
r4mmer Apr 9, 2025
f0f4f37
tests(integration): expect bigint amounts and use bigint JSON parsing
r4mmer Apr 11, 2025
8466a7e
chore: remove zod as dependency
r4mmer Apr 11, 2025
df5b222
chore: do not use JSONBigInt when not needed
r4mmer Apr 11, 2025
d1675ce
chore: do not use JSONBigInt when not needed
r4mmer Apr 11, 2025
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 .codebuild/buildspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ phases:
#If you use the Ubuntu standard image 2.0 or later, you must specify runtime-versions.
#If you specify runtime-versions and use an image other than Ubuntu standard image 2.0, the build fails.
runtime-versions:
nodejs: 20
nodejs: 22
# name: version
commands:
- npm install -g yarn
Expand Down
3 changes: 3 additions & 0 deletions db/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ module.exports = {
port: process.env.DB_PORT || 3306,
dialect: 'mysql',
dialectOptions: {
supportBigNumbers: true,
bigNumberStrings: true,
},
},
Expand All @@ -20,6 +21,7 @@ module.exports = {
port: process.env.CI_DB_PORT || 3306,
dialect: 'mysql',
dialectOptions: {
supportBigNumbers: true,
bigNumberStrings: true,
},
},
Expand All @@ -31,6 +33,7 @@ module.exports = {
port: process.env.DB_PORT,
dialect: 'mysql',
dialectOptions: {
supportBigNumbers: true,
bigNumberStrings: true,
},
},
Expand Down
40 changes: 22 additions & 18 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
inherit (packages) nodePackages;
in
{
nodejs = final.nodejs_20;
nodejs = final.nodejs_22;
nodePackages = prev.nodePackages;
yarn = (import unstableNixPkgs { system = final.system; }).yarn-berry;
};
Expand All @@ -34,7 +34,7 @@
devShell = pkgs.devshell.mkShell {
packages = with pkgs; [
nixpkgs-fmt
nodejs_20
nodejs_22
yarn
docker-compose
];
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"packages/wallet-service"
],
"engines": {
"node": ">=18"
"node": ">=22"
},
"nohoist": [
"**"
Expand All @@ -34,7 +34,7 @@
"@aws-sdk/client-apigatewaymanagementapi": "3.540.0",
"@aws-sdk/client-lambda": "3.540.0",
"@aws-sdk/client-sqs": "3.540.0",
"@hathor/wallet-lib": "1.15.0",
"@hathor/wallet-lib": "2.1.1",
"@wallet-service/common": "1.5.0",
"bip32": "^4.0.0",
"bitcoinjs-lib": "^6.1.5",
Expand Down
12 changes: 6 additions & 6 deletions packages/common/__tests__/events/nftCreationTx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const nftCreationTx = {
is_voided: false,
inputs: [
{
value: 100,
value: 100n,
token_data: 0,
script: 'dqkUaf+xVJ8uAPML/AzwuSB+2W9/M7qIrA==',
decoded: {
Expand All @@ -43,7 +43,7 @@ export const nftCreationTx = {
],
outputs: [
{
value: 1,
value: 1n,
token_data: 0,
// Decoded script: 5ipfs://QmPCSXNDyPdhU9oQFpxFsNN3nTjg9ZoqESKY5n9Gp1XSJc
script: 'NWlwZnM6Ly9RbVBDU1hORHlQZGhVOW9RRnB4RnNOTjNuVGpnOVpvcUVTS1k1bjlHcDFYU0pjrA==',
Expand All @@ -53,7 +53,7 @@ export const nftCreationTx = {
selected_as_input: false,
},
{
value: 98,
value: 98n,
token_data: 0,
script: 'dqkUQcQx/3rV1s5VZXqZPc1dkQbPo6eIrA==',
decoded: {
Expand All @@ -65,7 +65,7 @@ export const nftCreationTx = {
spent_by: null,
},
{
value: 1,
value: 1n,
token_data: 1,
script: 'dqkUQcQx/3rV1s5VZXqZPc1dkQbPo6eIrA==',
decoded: {
Expand All @@ -77,7 +77,7 @@ export const nftCreationTx = {
spent_by: null,
},
{
value: 1,
value: 1n,
token_data: 129,
script: 'dqkU1YP+t130UoYD+3ys9MYt1zkWeY6IrA==',
decoded: {
Expand All @@ -89,7 +89,7 @@ export const nftCreationTx = {
spent_by: null,
},
{
value: 2,
value: 2n,
token_data: 129,
script: 'dqkULlcsARvA+pQS8qytBr6Ryjc/SLeIrA==',
decoded: {
Expand Down
20 changes: 10 additions & 10 deletions packages/common/__tests__/utils/nft.utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const REAL_NFT_EVENT_DATA = {
'tx_id': '00000000ba6f3fc01a3e8561f2905c50c98422e7112604a8971bdaba1535e797',
'index': 1,
'spent_output': {
'value': 4,
'value': 4n,
'token_data': 0,
'script': 'dqkUWDMJLPqtb9X+jPcBSP6WLg6NIC6IrA==',
'decoded': {
Expand All @@ -69,13 +69,13 @@ const REAL_NFT_EVENT_DATA = {
],
'outputs': [
{
'value': 1,
'value': 1n,
'token_data': 0,
'script': 'C2lwZnM6Ly8xMTExrA==',
'decoded': null
},
{
'value': 2,
'value': 2n,
'token_data': 0,
'script': 'dqkUFUs/hBsLnxy5Jd94WWV24BCmIhmIrA==',
'decoded': {
Expand All @@ -85,7 +85,7 @@ const REAL_NFT_EVENT_DATA = {
}
},
{
'value': 1,
'value': 1n,
'token_data': 1,
'script': 'dqkUhM3YhAjNc5p/oqX+yqEYcX+miNmIrA==',
'decoded': {
Expand Down Expand Up @@ -475,7 +475,7 @@ describe('transaction transformation compatibility', () => {
index: 0,
spent_output: {
token_data: (1 & hathorLib.constants.TOKEN_INDEX_MASK) + 1, // First token
value: 100,
value: 100n,
script: 'script1',
decoded: {
type: 'P2PKH',
Expand All @@ -486,7 +486,7 @@ describe('transaction transformation compatibility', () => {
}],
outputs: [{
token_data: (0 & hathorLib.constants.TOKEN_INDEX_MASK) + 1, // HTR token
value: 100,
value: 100n,
script: 'script2',
decoded: {
type: 'P2PKH',
Expand Down Expand Up @@ -632,7 +632,7 @@ describe('processNftEvent', () => {
tx_id: '00000000ba6f3fc01a3e8561f2905c50c98422e7112604a8971bdaba1535e797',
index: 1,
spent_output: {
value: 4,
value: 4n,
token_data: 0,
script: 'dqkUWDMJLPqtb9X+jPcBSP6WLg6NIC6IrA==',
decoded: {
Expand All @@ -645,13 +645,13 @@ describe('processNftEvent', () => {
],
outputs: [
{
value: 1,
value: 1n,
token_data: 0,
script: 'C2lwZnM6Ly8xMTExrA==',
decoded: null
},
{
value: 2,
value: 2n,
token_data: 0,
script: 'dqkUFUs/hBsLnxy5Jd94WWV24BCmIhmIrA==',
decoded: {
Expand All @@ -661,7 +661,7 @@ describe('processNftEvent', () => {
}
},
{
value: 1,
value: 1n,
token_data: 1,
script: 'dqkUhM3YhAjNc5p/oqX+yqEYcX+miNmIrA==',
decoded: {
Expand Down
2 changes: 1 addition & 1 deletion packages/common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"test": "jest --runInBand --collectCoverage --detectOpenHandles --forceExit"
},
"peerDependencies": {
"@hathor/wallet-lib": "1.15.0"
"@hathor/wallet-lib": "2.1.1"
},
"dependencies": {
"@aws-sdk/client-lambda": "3.540.0",
Expand Down
Loading