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
5 changes: 4 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ jobs:
DEFAULT_SERVER: https://node1.mainnet.hathor.network/v1a/
VOIDED_TX_OFFSET: 5
WS_DOMAIN: ws.wallet-service.hathor.network
AUTH_SECRET: ""
AUTH_SECRET: "foobar"
WALLET_SERVICE_LAMBDA_ENDPOINT: ""
FIREBASE_PROJECT_ID: ""
FIREBASE_PRIVATE_KEY_ID: ""
Expand All @@ -114,6 +114,9 @@ jobs:
ALERT_MANAGER_REGION: us-east-1
ALERT_MANAGER_TOPIC: alert-topic
PUSH_ALLOWED_PROVIDERS: ""
REDIS_URL: redis://127.0.0.1:6379
REDIS_PASSWORD: ""
IS_OFFLINE: 'true'

- name: Run integration tests on the daemon
run: |
Expand Down
33 changes: 33 additions & 0 deletions db/migrations/20250306170811-node_version_proxy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
'use strict';

/** @type {import('sequelize-cli').Migration} */
module.exports = {
async up (queryInterface, Sequelize) {
// Dropping the table and recreating it is easier than deleting the fields then adding the new
// one, there is also no danger of losing any data since this is fetched from the fullnode
await queryInterface.dropTable('version_data');
await queryInterface.createTable('version_data', {
id: {
type: Sequelize.INTEGER.UNSIGNED,
allowNull: false,
primaryKey: true,
defaultValue: 1,
},
timestamp: {
type: Sequelize.BIGINT.UNSIGNED,
allowNull: false,
},
data: {
type: Sequelize.TEXT,
Comment thread
andreabadesso marked this conversation as resolved.
allowNull: false,
},
});
},

async down (queryInterface, Sequelize) {
await queryInterface.dropTable('version_data');
// The "old" table structure was copied from ./20210706175820-create-version-data.js
const { up } = require('./20210706175820-create-version-data');
await up(queryInterface, Sequelize);
}
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,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": "0.39.0",
"@hathor/wallet-lib": "1.14.1",
"@wallet-service/common": "1.5.0",
"bip32": "^4.0.0",
"bitcoinjs-lib": "^6.1.5",
Expand Down
15 changes: 8 additions & 7 deletions packages/common/__tests__/events/nftCreationTx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
/* eslint-disable @typescript-eslint/no-empty-function */

import { Context } from 'aws-lambda';
import { Transaction, TxOutput } from '../../src/types';
import { TxOutput } from '../../src/types';
// FIXME: import from lib path on HathorLib
import { HistoryTransaction } from '@hathor/wallet-lib/lib/models/types';

/**
* A sample transaction for a NFT creation, as obtained by a wallet's history methods
Expand Down Expand Up @@ -115,12 +117,12 @@ export const nftCreationTx = {
/**
* Gets a copy of the `nftCreationTx` in the Wallet Service's Transaction format.
*/
export function getTransaction(): Transaction {
const result = {
export function getTransaction(): HistoryTransaction {
return {
tx_id: nftCreationTx.tx_id,
nonce: 1,
timestamp: nftCreationTx.timestamp,
signal_bits: nftCreationTx.signal_bits,
signalBits: nftCreationTx.signal_bits,
version: nftCreationTx.version,
weight: nftCreationTx.weight,
parents: nftCreationTx.parents,
Expand Down Expand Up @@ -150,12 +152,11 @@ export function getTransaction(): Transaction {
token_data: o.token_data,
locked: false,
})) as TxOutput[],
height: 8,
token_name: nftCreationTx.token_name,
token_symbol: nftCreationTx.token_symbol,
is_voided: nftCreationTx.is_voided,
tokens: nftCreationTx.tokens,
};

return result;
}

/**
Expand Down
Loading