-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: call onNewNftEvent when a new NFT tx is received (#150)
* feat: added nft utils * tests: added tests for common utils * chore: added common module to CI * refactor: moved used types to common package * tests: removed nft utils * tests: fixed nft tests on txProcessor * tests: mocking network on getconfig * tests: fixed nft tests on txProcessor * refactor: passing logger to invoke nft handler * refactor: no need to ignore ts * chore: removed jest script, instead using only test * chore: added hathor header * refactor: using common utils on txProcessor * tests: nft utils using old syntax * tests: skipped txProcessor tests * tests: fixed txProcessor tests * refactor: using isAuthority from common utils * refactor: using isAuthority from common types * refactor: using assertEnvVariablesExistance from common project * refactor: getting CREATE_NFT_MAX_RETRIES from env * docs: updated docstrings on nft utils * chore: removed events/nftCreationTx.ts * refactor: invalid import locations * refactor: remove unused lambdas (#155) * tests: fixed nft tests on txProcessor * refactor: removed all methods related to the old wallet-service txProcessor
- Loading branch information
1 parent
8604db6
commit c19c2c3
Showing
33 changed files
with
708 additions
and
2,016 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,7 @@ | |
"author": "André Abadesso <[email protected]>", | ||
"private": true, | ||
"devDependencies": { | ||
"@types/jest": "^29.5.12", | ||
"@typescript-eslint/eslint-plugin": "^7.4.0", | ||
"@typescript-eslint/parser": "^7.4.0", | ||
"dotenv": "^16.4.5", | ||
|
@@ -36,6 +37,7 @@ | |
"bip32": "^4.0.0", | ||
"bitcoinjs-lib": "^6.1.5", | ||
"bitcoinjs-message": "^2.2.0", | ||
"jest": "^29.7.0", | ||
"tiny-secp256k1": "^2.2.3", | ||
"winston": "3.13.0" | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export const mockedAddAlert = jest.fn(); | ||
export default jest.mock('@src/utils/alerting.utils', () => ({ | ||
addAlert: mockedAddAlert.mockReturnValue(Promise.resolve()), | ||
})); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
module.exports = { | ||
roots: ["<rootDir>/__tests__"], | ||
testRegex: ".*\\.test\\.ts$", | ||
moduleNameMapper: { | ||
'^@src/(.*)$': '<rootDir>/src/$1', | ||
'^@tests/(.*)$': '<rootDir>/__tests__/$1', | ||
'^@events/(.*)$': '<rootDir>/__tests__/events/$1', | ||
}, | ||
transform: { | ||
"^.+\\.ts$": ["ts-jest", { | ||
tsconfig: "./tsconfig.json", | ||
babelConfig: { | ||
sourceMaps: true, | ||
} | ||
}] | ||
}, | ||
moduleFileExtensions: ["ts", "js", "json", "node"] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,19 @@ | ||
{ | ||
"name": "@wallet-service/common", | ||
"packageManager": "[email protected]", | ||
"scripts": { | ||
"test": "jest --runInBand --collectCoverage --detectOpenHandles --forceExit" | ||
}, | ||
"peerDependencies": { | ||
"@aws-sdk/client-lambda": "3.540.0", | ||
"@hathor/wallet-lib": "0.39.0", | ||
"winston": "^3.13.0" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "^20.11.30" | ||
"@types/aws-lambda": "^8.10.136", | ||
"@types/node": "^20.11.30", | ||
"jest": "^29.6.4", | ||
"ts-jest": "^29.1.2", | ||
"typescript": "^5.4.3" | ||
} | ||
} |
Oops, something went wrong.