We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 59c7def commit 2e942e0Copy full SHA for 2e942e0
db/seeders/20250416132150-add-htr-token.js
@@ -2,6 +2,16 @@
2
3
module.exports = {
4
up: async (queryInterface) => {
5
+ // Check if HTR token already exists
6
+ const [existing] = await queryInterface.sequelize.query(
7
+ "SELECT id FROM token WHERE id = '00'"
8
+ );
9
+
10
+ if (existing.length > 0) {
11
+ console.log('HTR token already exists, skipping.');
12
+ return;
13
+ }
14
15
// Count unique transactions for HTR
16
const [results] = await queryInterface.sequelize.query(
17
"SELECT COUNT(DISTINCT tx_id) AS count FROM tx_output WHERE token_id = '00'"
@@ -14,6 +24,7 @@ module.exports = {
24
name: 'Hathor',
25
symbol: 'HTR',
26
transactions: htrTxCount,
27
+ version: 0, // TokenVersion.NATIVE
28
}]);
18
29
},
19
30
0 commit comments