Compare commits

..

525 Commits

Author SHA1 Message Date
softsimon
271726bf58 Merge pull request #996 from mempool/wiz/fix-upgrade-script-for-simon
Tweak upgrade script to search for remote origin branches
2021-12-09 14:29:28 +04:00
wiz
65e11c1aa1 Merge pull request #997 from mempool/simon/backend-libs-upgrade
Upgrading backend libraries
2021-12-09 10:27:59 +00:00
softsimon
0ccc992e4b Merge pull request #995 from hunicus/fix-windows-graph
Fix graph issue in #992
2021-12-09 14:17:51 +04:00
wiz
52397cb341 Merge pull request #993 from mempool/simon/angular-13
Upgrading frontend to Angular 13
2021-12-09 10:16:54 +00:00
softsimon
f7a9b691a8 Upgrading backend libraries 2021-12-09 13:24:29 +04:00
wiz
8f8c9c1fbc Merge pull request #986 from mempool/simon/liquid-peg-in-out-links-fix
Fixing broken Liquid peg-in and peg-out links
2021-12-09 09:21:41 +00:00
wiz
9e8ee4fedc Tweak upgrade script to search for remote origin branches 2021-12-09 18:12:06 +09:00
hunicus
30ffc0b56e Fix graph issues in #992 2021-12-08 17:50:02 -05:00
softsimon
053fb4d1b2 Merge pull request #991 from knorrium/add_nvmrc
Add .nvmrc file
2021-12-08 23:06:30 +04:00
softsimon
53cfda533d Merge pull request #989 from knorrium/update_cypress_deps
Update Cypress dependencies
2021-12-08 22:57:50 +04:00
softsimon
2d557195de Merge pull request #988 from knorrium/pin_node_version_on_gha
Pin node version on e2e GHA
2021-12-08 22:57:24 +04:00
softsimon
ed9b46bae0 Upgrading frontend to Angular 13 2021-12-08 22:08:20 +04:00
softsimon
7c89dde5d4 Merge pull request #983 from mempool/wiz/fix-about-page-staff-string
Fix string for Project Staff on About page
2021-12-08 14:36:20 +04:00
softsimon
87ca5b85d7 Fixing broken Liquid peg-in and peg-out links
fixes #977
2021-12-08 11:50:51 +04:00
Felipe Knorr Kuhn
a2a43f4647 Add .nvmrc to set node to 16.10.0 when changing into the project 2021-12-07 22:55:10 -08:00
Felipe Knorr Kuhn
9ac77f7113 Update Cypress dependencies 2021-12-07 22:25:10 -08:00
Felipe Knorr Kuhn
b6215dd54f Enable dependency caching on e2e GHA 2021-12-07 21:27:22 -08:00
Felipe Knorr Kuhn
69d5cfe98e Use node 16.10.0 on the e2e GHA 2021-12-07 21:22:21 -08:00
wiz
73d9cd7ab7 Merge pull request #981 from mempool/wiz/fix-npm-install-prod
Move npm deps in package.json to fix `npm install --prod`
2021-12-08 04:24:48 +00:00
wiz
84a6d29914 Fix i18n identifier for About Page -> Project Staff string
Co-authored-by: softsimon <softsimon@users.noreply.github.com>
2021-12-08 04:16:34 +00:00
wiz
4633164f99 Merge pull request #984 from mempool/wiz/update-readme-for-v2.3.0
Update README for upcoming v2.3.0 release
2021-12-08 04:15:32 +00:00
wiz
b22b63c9a2 Update README for upcoming v2.3.0 release 2021-12-08 00:04:24 +09:00
wiz
40cd2a1ac3 Fix string for Project Staff on About page 2021-12-07 23:29:17 +09:00
wiz
e28f5cc403 Merge pull request #982 from mempool/simon/core-contributors
Adding Core Contributors on the About page
2021-12-07 14:16:44 +00:00
softsimon
1594fed853 Adding Core Contributors on the About page 2021-12-07 18:00:49 +04:00
wiz
41c61ef506 Move npm deps in package.json to fix npm install --prod 2021-12-07 10:42:06 +00:00
wiz
53b0bc0e48 Merge pull request #980 from knorrium/docker_node_16_10_0
Set Dockerfiles to use Node v16.10.0
2021-12-07 08:04:53 +00:00
Felipe Knorr Kuhn
e00234dfb9 Set Dockerfiles to use Node v16.10.0 2021-12-06 23:52:23 -08:00
wiz
8412e28073 Merge pull request #974 from mempool/simon/taproot-display-missing-script
Display missing taproot inner script
2021-12-07 07:26:29 +00:00
softsimon
10a110e682 Display missing taproot inner script
fixes #973
2021-12-06 00:27:14 +04:00
softsimon
1e40ec4fd0 Merge pull request #970 from mempool/wiz/center-enterprise-sponsor-logos
Center the Enterprise Sponsor logos on About page
2021-12-03 12:08:06 +04:00
wiz
9998a64fa5 Center the Enterprise Sponsor logos on About page 2021-12-03 16:55:56 +09:00
wiz
d1e3c55a28 Merge pull request #967 from mempool/wiz/rename-square-to-spiral 2021-12-03 06:26:35 +00:00
softsimon
047220bd32 Merge pull request #968 from mempool/i18n/20211203-update-from-transifex
Update i18n strings from Transifex
2021-12-03 10:25:19 +04:00
wiz
1ce05a3ac9 Merge pull request #961 from mempool/simon/remodeling-fee-bands
Remodeling how historical fees are stored and presented.
2021-12-03 02:37:33 +00:00
wiz
0271584b69 Update i18n strings from Transifex 2021-12-03 08:54:13 +09:00
wiz
01da46daca Square -> Spiral 🌀 2021-12-03 07:30:24 +09:00
wiz
73f558db6e Merge pull request #963 from mempool/simon/liquid-handle-database-disabled 2021-11-30 10:50:19 +00:00
softsimon
feb8e35ec3 Handle database disabled config when running Liquid
fixes #962
2021-11-30 10:59:10 +04:00
softsimon
79e44479e9 Remodeling how historical fees are stored and presented.
fixes #908
2021-11-29 23:31:01 +04:00
wiz
9a39d3207f Merge pull request #959 from mempool/simon/lbtc-loading-spinner
Adding missing loading spinner to L-BTC peg graph
2021-11-28 12:13:23 +00:00
softsimon
7e55e836fd Adding missing loading spinner to L-BTC peg graph
fixes #955
2021-11-28 15:44:42 +04:00
softsimon
571bf3fa64 Merge pull request #957 from mempool/simon/merging-duplicate-i18n-strings
Merged block header and markets i18n strings
2021-11-28 14:57:43 +04:00
softsimon
0b1cf052a8 Merged block header, markets and genesis i18n strings 2021-11-28 14:55:17 +04:00
wiz
b301840bb8 Merge pull request #956 from mempool/simon/i18n-extract-nov28
Extracting i18n from templates
2021-11-28 09:31:56 +00:00
softsimon
a0e5a79ec4 Extracting i18n from templates 2021-11-28 13:23:27 +04:00
wiz
8da89230c9 Merge pull request #944 from mempool/simon/chart-loading-spinner
Moving chart loading spinner to chart component
2021-11-28 08:19:52 +00:00
wiz
2408e81537 Merge pull request #954 from mempool/simon/transaction-pages-and-loading
Fixing Bisq transactions page and skeleton loaders
2021-11-28 08:16:36 +00:00
softsimon
9377d80dbb Fixing Bisq transactions page and skeleton loaders
fixes #953
2021-11-27 13:06:57 +04:00
softsimon
8c200bc0e4 Merge pull request #950 from MiguelMedeiros/fix-time-span-styles
Fix time span menu styles.
2021-11-23 14:13:33 +04:00
Miguel Medeiros
35ca8c846b fix: time span menu media queries styles. 2021-11-22 20:29:10 -03:00
softsimon
4b1acfc77e Skip the skeleton loader tests 2021-11-20 00:34:59 +04:00
softsimon
8569523b89 Moving chart loading spinner to chart component
fixes #885
2021-11-19 00:10:12 +04:00
wiz
9bef7da210 Merge pull request #881 from mempool/simon/tx-push-endpoint
Post TX API for HTML forms
2021-11-18 22:40:55 +09:00
softsimon
6f6b2a4355 Post TX API for HTML forms 2021-11-18 17:25:48 +04:00
softsimon
783530b3de Merge pull request #943 from mempool/wiz/20211118-update-privacy-policy
Delete nginx logs after 10 days and explain this in our Privacy Policy
2021-11-18 16:37:58 +04:00
wiz
36777a8c5b Clarify webserver logging and analytics in our Privacy Policy 2021-11-18 17:05:34 +09:00
wiz
638d6d896a Update newsyslog-mempool-nginx.conf for all nginx log paths 2021-11-18 15:28:44 +09:00
wiz
2afb9d359f Merge pull request #942 from mempool/i18n/enable-thai
Enable i18n locale Thai (th)
2021-11-18 14:41:04 +09:00
wiz
60a8d0ce6e Update i18n translations for Thai (th) 2021-11-18 14:29:36 +09:00
wiz
e3aeb784ad Merge pull request #935 from MiguelMedeiros/fix-tooltip-opreturn
Fix: op_return tooltip position.
2021-11-17 22:58:29 +09:00
wiz
8124274880 Credit Gusb3ll as Thai translator 2021-11-17 22:18:38 +09:00
wiz
836f0f065d Enable i18n locale Thai (th) 2021-11-17 21:03:35 +09:00
wiz
062fdb3658 Don't change cursor when hovering over OP_RETURN 2021-11-17 20:06:24 +09:00
wiz
7cfbd2c70d Merge pull request #940 from mempool/simon/empty-mempool-block-position
Fix for empty mempool block position
2021-11-17 19:40:16 +09:00
wiz
5b9ae2eaf5 Merge pull request #941 from mempool/simon/hide-early-difficulty-adjustment
Handle recent difficulty adjustment estimate gracefully
2021-11-17 19:29:48 +09:00
softsimon
d534c42c47 Handle recent difficulty adjustment estimate gracefully
fixes #927
2021-11-17 13:46:48 +04:00
softsimon
15a0644bd1 Fix for empty mempool block position
fixes #938
2021-11-17 12:37:40 +04:00
wiz
6ad4e655ea Merge pull request #910 from mempool/simon/liquid-fee-ranges
Display lower <1 s/vB fee rate tiers for Liquid
2021-11-17 17:01:29 +09:00
softsimon
598920d6a9 Merge pull request #928 from knorrium/fix_local_dev_proxy
Fix local dev proxy
2021-11-17 09:38:10 +04:00
Miguel Medeiros
d816e67ce4 fix: op_return tooltip position. 2021-11-16 18:03:43 -03:00
wiz
662aafff57 Merge pull request #930 from mempool/simon/more-transaction-details
Adding version and locktime to transaction details
2021-11-16 06:18:01 +09:00
softsimon
cfec9345c8 Merge pull request #932 from MiguelMedeiros/fix-empty-mempool-blocks
Fix: mempool empty block.
2021-11-16 00:26:15 +04:00
Miguel Medeiros
9cb203f98a ref: remove function to better performance 2021-11-15 17:10:54 -03:00
Miguel Medeiros
3bab50a43b fix: blocksfull variable. 2021-11-15 16:38:28 -03:00
Miguel Medeiros
0639ce9b07 fix: mempool empty block. 2021-11-15 14:16:27 -03:00
softsimon
34c9ca4197 Adding version and locktime to transaction details
fixes #929
2021-11-15 18:05:28 +04:00
Felipe Knorr Kuhn
14d015a904 Set the local target to use the new local proxy config 2021-11-14 15:41:28 -08:00
Felipe Knorr Kuhn
38412753fe Add new local server proxy config 2021-11-14 15:40:45 -08:00
wiz
475f9344a0 Merge pull request #923 from mempool/simon/taproot-activation-countdown
Adding taproot countdown
2021-11-13 15:19:42 +09:00
softsimon
d9cf6a2604 Update frontend/src/app/app.constants.ts
Co-authored-by: Vojtěch Strnad <43024885+vostrnad@users.noreply.github.com>
2021-11-13 10:04:38 +04:00
softsimon
9eb159617f Adding taproot countdown 2021-11-12 21:07:57 +04:00
softsimon
2dc930fad2 Merge pull request #912 from MiguelMedeiros/taproot-activation-fireworks
Add special blocks animation: fireworks.
2021-11-12 13:30:54 +04:00
softsimon
c478478f86 Merge pull request #922 from knorrium/update_test_address
Update mainnet partial address tests
2021-11-12 10:23:35 +04:00
Felipe Knorr Kuhn
7a07f67be5 Update mainnet partial address tests 2021-11-11 21:56:19 -08:00
Miguel Medeiros
a3de75ebf4 Add mempool special block animation. 2021-11-11 16:04:00 -03:00
Miguel Medeiros
46a2854f67 Add taproot activation fireworks. 2021-11-11 16:04:00 -03:00
softsimon
033f066abf Merge pull request #898 from MiguelMedeiros/fix-translations-strings-tooltip-echarts
Localization: Add localize strings at echarts tooltip.
2021-11-11 15:28:49 +04:00
softsimon
97244c7b35 Merge pull request #921 from MiguelMedeiros/fix-button-menu-styles
Fix menu button styles.
2021-11-11 00:02:42 +04:00
Miguel Medeiros
3d92369ed6 fix: menu button styles. 2021-11-10 12:18:29 -03:00
wiz
2bee46951c Merge pull request #920 from mempool/simon/display-transaction-prevout-type
Display previous output types
2021-11-10 23:06:26 +09:00
wiz
61ffcd0065 Merge pull request #918 from mempool/simon/taproot-tag
Adding Taproot transaction tag
2021-11-10 22:58:02 +09:00
wiz
88e79c220f Merge pull request #902 from MiguelMedeiros/fix-nginx-docs
Doc: Fix nginx package name.
2021-11-10 22:33:34 +09:00
Miguel Medeiros
a2c21e9036 Add id to size string. 2021-11-10 10:26:26 -03:00
Miguel Medeiros
8a0316a562 Add localize strings at echarts tooltip. 2021-11-10 10:25:00 -03:00
softsimon
055c1f2aa5 Display previous output types
fixes #917
2021-11-10 16:17:03 +04:00
softsimon
88e48df8a9 Adding Taproot transaction tag
fixes #914
2021-11-10 15:05:45 +04:00
softsimon
b81d296635 Merge pull request #916 from mempool/wiz/enable-autocomplete-for-all-networks
Enable address autocomplete for all networks
2021-11-10 11:43:48 +04:00
wiz
9f68f57d8a Enable address autocomplete for all networks 2021-11-10 07:56:07 +01:00
softsimon
26a540a57c Display lower <1 s/vB fee rate tiers for Liquid
fixes #859
2021-11-10 00:04:58 +04:00
softsimon
ad8398e3d4 Merge pull request #897 from MiguelMedeiros/fix-rtl-menu-mobile
UI/UX: Fix rtl mobile header menu.
2021-11-06 01:50:51 +04:00
softsimon
0fabf8dbc3 Merge pull request #905 from MiguelMedeiros/add-2y-3y-graph-time-span
UI/UX: Add 2y and 3y statistics time span.
2021-11-05 23:09:35 +04:00
softsimon
cd63c6c0c1 Merge pull request #890 from MiguelMedeiros/fix-buttons-graph-page
UI/UX: Fix buttons positions at graphs page.
2021-11-04 13:21:00 +04:00
Miguel Medeiros
c95f75254b Add 2y and 3y statistics time span. 2021-11-01 22:06:10 -03:00
Miguel Medeiros
9e4ad51b79 Fix nginx docs. 2021-11-01 20:57:20 -03:00
Miguel Medeiros
6e35102b3a Fix rtl mobile header menu. 2021-11-01 11:11:50 -03:00
Miguel Medeiros
d1e72c0cc0 Fix loading icon position. 2021-10-29 10:46:16 -03:00
Miguel Medeiros
1925023eb2 fix: check buttons at graphs page 2021-10-29 10:04:30 -03:00
softsimon
377eb0cae5 Merge pull request #892 from MiguelMedeiros/fix-tooltip-echarts-liquid
UI/UX: Fix Liquid.network missing tooltip series name.
2021-10-29 13:28:21 +04:00
softsimon
e33e4b1d71 Merge pull request #873 from MiguelMedeiros/fix-height-title-components
UI/UX: Fix height inconsistencies between components.
2021-10-29 12:14:26 +04:00
softsimon
b8f3c1f124 Merge pull request #884 from mempool/simon/electrs-error-handling
Handle new type of Electrum Server error.
2021-10-29 11:29:49 +04:00
wiz
5333ec0b99 Merge pull request #893 from knorrium/e2e_base_module_cleanup
e2e BASE_MODULE cleanup
2021-10-28 14:30:06 +09:00
wiz
f761c5d966 Merge pull request #894 from knorrium/fe_dev_instructions 2021-10-28 14:13:58 +09:00
Felipe Knorr Kuhn
3b6d07cace Add instructions on how to contribute to the Frontend codebase 2021-10-27 21:50:51 -07:00
Felipe Knorr Kuhn
cbeeef3b2c Remove BASE_MODULE from the GHA env vars as we read from the config now 2021-10-27 20:52:50 -07:00
Felipe Knorr Kuhn
5dab44e6c4 Cleanup Cypress config and commands 2021-10-27 20:49:49 -07:00
Felipe Knorr Kuhn
5139ffb4df Update e2e tests BASE_MODULE resolution 2021-10-27 20:40:44 -07:00
Miguel Medeiros
06706be18f fix: Liquid missing tooltip serie name. 2021-10-27 01:58:54 -03:00
Miguel Medeiros
9264f3cf4f Fix title styles. 2021-10-26 21:47:28 -03:00
Miguel Medeiros
d6a9017267 Fix disable button font-size. 2021-10-26 21:47:27 -03:00
Miguel Medeiros
bad75cfd4e Fix address title styles.
Fix tx title margin right .
2021-10-26 21:47:27 -03:00
Miguel Medeiros
68240e4f5c Fix skeleton css styles. 2021-10-26 21:47:26 -03:00
Miguel Medeiros
9d9ff6ed91 Fix titles height inconsistencies. 2021-10-26 21:47:26 -03:00
softsimon
f19b84090a Merge pull request #887 from knorrium/fix_ws_api_docs
Fix ws api docs
2021-10-25 18:11:40 +04:00
Felipe Knorr Kuhn
85c4574cbd Update HTML template for the WS API examples 2021-10-24 22:47:50 -07:00
Felipe Knorr Kuhn
e2c4e42c81 Fix WS API examples 2021-10-24 22:47:02 -07:00
softsimon
dd6c26b079 Handle new type of Electrum Server error.
fixes #872
2021-10-23 11:46:38 +04:00
Felipe Knorr Kuhn
837992f7ea Route json assets based on the BASE_MODULE 2021-10-22 11:54:28 -07:00
Felipe Knorr Kuhn
40914236d4 Update references to the JS proxy config 2021-10-22 11:52:23 -07:00
Felipe Knorr Kuhn
f52c36093e Remove old json based proxy config 2021-10-22 11:51:52 -07:00
wiz
a9f4418e1a Merge pull request #880 from mempool/simon/transaction-output-id
Add output ID to transaction info
2021-10-20 22:32:31 +09:00
softsimon
1a37c8b116 Add output ID to transaction info
fixes #413
2021-10-20 15:44:43 +04:00
wiz
39d231bb3c Merge pull request #879 from mempool/simon/push-tx-form
Broadcast transaction form
2021-10-19 22:30:03 +09:00
softsimon
4046c3176f Broadcast transaction form
fixes #878
2021-10-19 17:10:30 +04:00
softsimon
c257fbfdcb Merge pull request #874 from MiguelMedeiros/fix-typo
Ref: Fix typo.
2021-10-18 16:26:07 +04:00
Miguel Medeiros
1659be0d9f Fix typo. 2021-10-12 10:54:14 -03:00
softsimon
6f9762d50b Merge pull request #868 from MiguelMedeiros/fix-tooltip-dashboard
UI/UX: Fix mempool chart tooltip at dashboard component.
2021-10-08 22:40:29 +04:00
Miguel Medeiros
9bf475bc97 Fix filter color. 2021-10-08 15:30:26 -03:00
Miguel Medeiros
e59a318cad Fix mempool chart tooltip at dashboard component. 2021-10-08 15:11:59 -03:00
softsimon
57b64f64ad Merge pull request #867 from MiguelMedeiros/fix-tooltip-charts
UI/UX: Fix fee rate tiers on graphs.
2021-10-08 21:54:36 +04:00
Miguel Medeiros
af3af5f099 Fix tooltip ranges. 2021-10-08 12:42:43 -03:00
softsimon
fec603d5c5 Merge pull request #866 from mempool/wiz/fix-ios-top-notch-color
Set the iOS status bar when viewing as progressive web app
2021-10-08 15:36:34 +04:00
softsimon
ed2ebb1c70 Merge pull request #862 from MiguelMedeiros/ui-tooltip-size
UI/UX: Make tooltip looks bigger on mempool fee chart.
2021-10-08 13:59:45 +04:00
wiz
14d2f8dd97 Set the iOS status bar when viewing as progressive web app 2021-10-08 18:23:21 +09:00
wiz
bf563cc195 Merge pull request #847 from MiguelMedeiros/add-filtering-mempool-charts
Add mempool chart filtering.
2021-10-08 09:54:28 +09:00
Miguel Medeiros
f66e0a2c12 Make tooltip style looks bigger 2021-10-07 16:19:57 -03:00
Miguel Medeiros
a43cd48795 Remove unecessary code to controle legends.
Fix order of active and inactive fee ranges.
2021-10-07 16:03:21 -03:00
Miguel Medeiros
44339daedf Add toggle button to dropdown menu.
Revert left margin from tv page.
Change text dropdown filter to icon.
Change dropdown inactive item color.
Revert 500 limit rate.
2021-10-07 14:20:06 -03:00
Miguel Medeiros
14b7b6427a Change dropdown button text. 2021-10-07 14:20:06 -03:00
Miguel Medeiros
a2e866d15a Change filters to dropdown selection menu. 2021-10-07 14:20:05 -03:00
Miguel Medeiros
c2f288a861 Add mempool chart filtering. 2021-10-07 14:20:05 -03:00
wiz
e1c943d0a7 Merge pull request #856 from mempool/simon/mempool-blocks-amount-display-fix
Display correct amount of mempool blocks on mobile
2021-10-07 08:03:42 +09:00
softsimon
fa2d2e60b5 Merge pull request #857 from mempool/wiz/fix-robots-txt
Remove sitemap.xml from robots.txt
2021-10-06 13:21:40 +04:00
wiz
c919980652 Remove sitemap.xml from robots.txt 2021-10-06 17:36:01 +09:00
softsimon
b48389ae7d Display correct amount of mempool blocks on mobile
fixes #854
2021-10-05 15:40:28 +04:00
wiz
2bac7f9987 Merge pull request #855 from mempool/simon/liquid-dashboard-update
Display mempool graph on the Liquid dashboard
2021-10-05 20:16:32 +09:00
softsimon
acf6fd9db5 Display mempool graph on the Liquid dashboard 2021-10-05 15:08:41 +04:00
wiz
74a9b65e81 Merge pull request #853 from mempool/simon/mempool-blocks-config-fix
Use MEMPOOL_BLOCKS_AMOUNT config in the frontend
2021-10-05 10:06:41 +09:00
softsimon
822c840e54 Use MEMPOOL_BLOCKS_AMOUNT config in the frontend
fixes #852
2021-10-05 04:37:24 +04:00
wiz
6e93ef68fe Merge pull request #848 from mempool/simon/update-preview-image
Update README preview image
2021-10-02 05:37:18 +09:00
wiz
3006deae6e Merge pull request #845 from MiguelMedeiros/add-dashed-line
Add mark line to mempool chart.
2021-10-02 05:36:09 +09:00
softsimon
740f5c2003 Update README.md 2021-10-01 21:45:20 +04:00
Miguel Medeiros
5c9d44e9eb Fix dotted line style at tx chart.
Remove dotted line from inverted mempool chart.
2021-10-01 00:35:08 -03:00
wiz
88527b41e7 Merge pull request #846 from MiguelMedeiros/fix-optimize-series-data
Remove vbytesPipe from series data.
2021-10-01 04:44:08 +09:00
Miguel Medeiros
83cce0c3a7 Remove vbytesPipe from series data. 2021-09-29 21:47:39 -03:00
Miguel Medeiros
e144d0c8e5 Add mark line to mempool chart. 2021-09-29 21:44:13 -03:00
wiz
d72dbc1415 Merge pull request #840 from MiguelMedeiros/fix-confirmation-button-position
Fix confirmations button positioning.
2021-09-30 05:46:08 +09:00
Miguel Medeiros
b857a7c37f Fix rtl transaction title. 2021-09-29 17:13:21 -03:00
Miguel Medeiros
c72c287b27 Fix confirmations button positioning. 2021-09-29 16:16:39 -03:00
wiz
18e0a17d26 Merge pull request #843 from MiguelMedeiros/fix-sum-bar-values
Fix total percentage bar value.
2021-09-30 03:59:44 +09:00
Miguel Medeiros
87eeef5d41 Fix total percentage bar value. 2021-09-29 15:12:54 -03:00
softsimon
76a2fdeea7 Merge pull request #839 from MiguelMedeiros/fix-shadowed-variable
Fix lint 'no-shadowed-variable'.
2021-09-29 17:20:39 +04:00
softsimon
792eb3727c Merge pull request #838 from MiguelMedeiros/fix-localized-numbers-mempool-charts
Fix parse numbers localized.
2021-09-29 17:16:48 +04:00
softsimon
2e0845847d Merge pull request #837 from MiguelMedeiros/fix-circle-dots-mempool-charts
Remove circle symbols when hovering the series.
2021-09-29 17:15:18 +04:00
Miguel Medeiros
8f774e55a8 Fix lint 'no-shadowed-variable'. 2021-09-28 21:04:48 -03:00
Miguel Medeiros
28418640bb Fix parse numbers localized. 2021-09-28 21:00:29 -03:00
Miguel Medeiros
8aae5c1c9c Remove circle symbols when hovering the series.
Fix selected index when hovering the series.
2021-09-28 20:13:08 -03:00
wiz
92048964d1 Merge pull request #831 from MiguelMedeiros/fix-sum-column-ui-mempool-chart
Change total sum column to fixed color.
2021-09-29 02:05:15 +09:00
Miguel Medeiros
b2140c2abe Change total sum column to fixed color. 2021-09-28 10:16:27 -03:00
wiz
d0a8509194 Merge pull request #826 from mempool/simon/bisq-transaciton-filter-fix
Fix for stuck Bisq transaction page when filtering
2021-09-27 19:20:28 +09:00
wiz
aa0c3e6fed Merge pull request #825 from MiguelMedeiros/fix-focus-effect-mempool-chart
Fix the focus effect on the mempool graph.
2021-09-27 19:12:49 +09:00
softsimon
f0462114f3 Fix for stuck Bisq transaction page when filtering
fixes #540
2021-09-27 02:37:57 +04:00
Miguel Medeiros
9e0f9840aa Fix the focus effect on the mempool graph. 2021-09-26 16:59:00 -03:00
wiz
d763c30f6a Merge pull request #824 from mempool/simon/lbtc-widget-minor-ux
L-BTC graph: Minor styling update
2021-09-27 04:07:23 +09:00
wiz
92b69657da Merge pull request #814 from mempool/simon/block-transactions-sorting-fix
Sort block transactions first by height and then time
2021-09-27 04:04:46 +09:00
wiz
d9ec0c1a36 Merge pull request #823 from MiguelMedeiros/fix-tooltip-inverted-chart
Fix tooltip mempool chart hover selection.
2021-09-27 04:03:34 +09:00
wiz
4bf9f8b062 Merge pull request #821 from mempool/simon/post-tx-api
Adding POST /tx API to bitcoind mode
2021-09-27 04:03:25 +09:00
softsimon
eefd8104bb L-BTC graph: Minor styling update 2021-09-26 22:57:37 +04:00
wiz
16e807c4b0 Fix API docs curl example for POST /api/tx 2021-09-27 03:49:20 +09:00
Miguel Medeiros
461296e002 Remove uncessary variable check. 2021-09-26 15:47:08 -03:00
softsimon
86c877c8e9 Adding POST /tx API to bitcoind mode
fixes #777
2021-09-26 22:46:23 +04:00
Miguel Medeiros
80fcceef73 Fix size column order when invert mempool chart. 2021-09-26 15:39:37 -03:00
Miguel Medeiros
b0e54818ae Fix mempool chart tooltip hover selection. 2021-09-26 15:24:29 -03:00
Miguel Medeiros
acbd7f0bde Fix inverted tooltip when invert chart. 2021-09-26 15:17:39 -03:00
wiz
9a6efceb34 Merge pull request #820 from MiguelMedeiros/add-inverted-button
UI/UX: Add inverted feature to mempool fee chart.
2021-09-27 01:36:06 +09:00
Miguel Medeiros
5ce7b55441 Add inverted chart feature. 2021-09-26 11:41:55 -03:00
wiz
a3edaf17cc Merge pull request #819 from mempool/simon/lpeg-liquid-test
Check for data to possibly fix Liquid test
2021-09-26 18:51:25 +09:00
softsimon
5695019216 Check for data to possibly fix Liquid test 2021-09-26 13:41:33 +04:00
wiz
7ab1ce8fc4 Merge pull request #813 from mempool/simon/significant-digits-fix
Fix for fee rounding not using locale
2021-09-26 05:25:21 +09:00
wiz
1f8ec2bd8e Merge pull request #812 from mempool/simon/liquid-block-hash-search-fix
Handle search for Liquid block hashes in search bar.
2021-09-26 05:15:06 +09:00
wiz
78b488466e Merge pull request #810 from mempool/simon/liquid-lbtc-dashboard-widget
L-BTC in circulation dashboard widgete
2021-09-26 05:10:47 +09:00
softsimon
66630743f6 L-BTC in circulation dashboard widget
refs #718
2021-09-25 23:45:10 +04:00
softsimon
ffa18bbe71 Sort block transactions first by height and then time
fixes #770
2021-09-25 16:28:11 +04:00
softsimon
8cb1c5c88c Fix for fee rounding not using locale
fixes #796
2021-09-25 15:50:31 +04:00
softsimon
bb07031362 Handle search for Liquid block hashes in search bar.
fixes #797
2021-09-25 14:37:54 +04:00
softsimon
31a0d44543 Merge pull request #809 from mempool/wiz/update-production-backend-configs
Update production backend configuration files
2021-09-24 22:00:12 +04:00
wiz
f90e19c767 Update production backend configuration files
* Set syslog priority to DEBUG since we're not Raspberry Pi
* Add 2nd core RPC configuration stubs for mainnet / liquid
2021-09-25 01:19:33 +09:00
wiz
800625d80e Merge pull request #799 from mempool/simon/liquid-lbtc-widget
Liquid L-BTC widgets (Backend)
2021-09-24 23:54:33 +09:00
wiz
552540f510 Merge pull request #806 from mempool/simon/angular-12-upgrade
Upgrading to Angular 12 and NgBootstrap 10
2021-09-23 05:10:52 +09:00
softsimon
bbee2dcb5b Upgrading to Angular 12 and NgBootstrap 10 2021-09-22 23:57:05 +04:00
softsimon
e4e338b05a Merge pull request #805 from mempool/wiz/update-unchained-url
Update the URL for Unchained Capital to unchained.com
2021-09-22 13:19:19 +04:00
wiz
061a55b236 Update the URL for Unchained Capital to unchained.com 2021-09-22 17:24:11 +09:00
softsimon
9f0f9230fb Merge pull request #804 from mempool/wiz/remove-warden-integration
Remove warden from list of Community Integrations
2021-09-22 11:13:07 +04:00
wiz
40956c0a23 Remove warden from list of Community Integrations 2021-09-22 02:19:48 +09:00
wiz
f29e35b325 Merge pull request #795 from MiguelMedeiros/bugfix-echarts-fixes
UI/UX: Fix charts css styling.
2021-09-22 02:07:43 +09:00
softsimon
d88efb8b0d Merge pull request #803 from mempool/wiz/add-zeus-integration
Add Zeus LN as Community Integration
2021-09-21 19:24:23 +04:00
Miguel Medeiros
b9489525c6 Revert charts margins. 2021-09-21 09:16:59 -03:00
Miguel Medeiros
8ddcd298b0 Fix axis labels css.
Change series smooth to false.
 Make charts margin smaller to match box container.
2021-09-21 09:16:59 -03:00
wiz
69df6e4dcb Add Zeus LN as Community Integration 2021-09-21 19:13:43 +09:00
softsimon
f3c8e2134b Handle errors gracefully. 2021-09-20 01:02:07 +04:00
wiz
0e25c52e67 Merge pull request #801 from mempool/simon/transifex-update 2021-09-20 02:02:12 +09:00
softsimon
60f41d3181 Transifex language fixes to Romanian, Makedonian and Hungarian. 2021-09-19 20:49:27 +04:00
wiz
50c5244abf Merge pull request #800 from mempool/simon/api-docs-hostname-fix
Always use local hostname for API examples.
2021-09-19 18:36:10 +09:00
softsimon
605c1a980c Always use local hostname for API examples. 2021-09-19 13:17:11 +04:00
softsimon
0d67bc36ee Refactoring the MINFEE node configuration into new configs. 2021-09-19 02:40:16 +04:00
softsimon
aa39bbd091 Elements blockchain parser. Save all peg in/out i the database. 2021-09-19 02:26:44 +04:00
softsimon
641d2ad028 Refactoring Bitcoin RPC client implementation 2021-09-18 13:18:47 +04:00
wiz
d602b20f56 Merge pull request #779 from mempool/simon/core-22-compatibility 2021-09-18 17:51:41 +09:00
softsimon
138f6e4e39 Update backend/src/api/bitcoin/bitcoin-api.interface.ts
Co-authored-by: Miguel Medeiros <miguel@miguelmedeiros.com.br>
2021-09-17 19:22:15 +04:00
softsimon
3e788ecbf9 Handle changes to address RPC api in bitcoin core 22
fixes #778
2021-09-17 19:22:15 +04:00
wiz
2236c6d9a6 Merge pull request #794 from mempool/simon/transifex-pull-20200917 2021-09-17 21:42:38 +09:00
softsimon
2a0a1b0213 Pulled from transifex 2021-09-17 16:27:24 +04:00
wiz
e6e49fd5d6 Merge pull request #793 from mempool/simon/credit-romanian-macedonian-translators 2021-09-17 20:49:14 +09:00
softsimon
f6d5f44469 Credit Romanian and Macedonian translators. 2021-09-17 14:19:53 +04:00
softsimon
51e09ff64f Merge pull request #775 from mempool/wiz/fix-canonical-name-for-three-sites
Set canonical URLs for new 3 site structure
2021-09-17 14:14:59 +04:00
softsimon
07ba2f6ecc Merge pull request #792 from mempool/i18n/add-macedonian
Add new locale: Macedonian (mk)
2021-09-17 13:54:03 +04:00
softsimon
bc42552bec Merge pull request #791 from mempool/i18n/add-romanian
Add new locale: Romanian (ro)
2021-09-17 13:53:35 +04:00
wiz
c6b44a3be9 Merge pull request #782 from TechMiX/rtlFixes
Fix RTL issues
2021-09-17 16:23:07 +09:00
wiz
e1f4de0de3 Set canonical URLs for new 3 site structure 2021-09-17 15:13:52 +09:00
wiz
d22dc0888a Add new locale: Macedonian (mk) 2021-09-17 15:03:52 +09:00
wiz
75fb27c690 Add new locale: Romanian (ro) 2021-09-17 15:02:15 +09:00
softsimon
401506a103 Merge pull request #789 from MiguelMedeiros/bugfix-echarts-mobile-mouseover
Disable mouseover legend for mobile users.
fixes #781
2021-09-17 03:24:10 +04:00
Miguel Medeiros
ab27ea28f0 Disable mouseover legend for mobile users. 2021-09-16 17:30:13 -03:00
softsimon
6e579ce0b6 Merge pull request #787 from mempool/wiz/disable-matomo-cookies
Disable matomo cookies - fixes #784
2021-09-16 17:45:37 +04:00
wiz
e7030cca32 Disable matomo cookies - fixes #784 2021-09-16 22:37:09 +09:00
TechMiX
2c496e9a50 add rtl hinting for new graph + move code rtl hints to style file 2021-09-15 12:06:55 +02:00
TechMiX
014d6dee66 fix various rtl issues 2021-09-15 11:02:04 +02:00
wiz
47ae306a75 Merge pull request #738 from MiguelMedeiros/feature-echarts
Feature: New charts library.
2021-09-15 11:08:11 +09:00
Miguel Medeiros
8b8b06e6ab Remove fee tier legends.
Fix tv page css.
2021-09-14 22:35:51 -03:00
Miguel Medeiros
fa7a45421e Fix linting and unclosed html tag.
Fix no shadowed variable tslint warning.
2021-09-14 22:35:51 -03:00
Miguel Medeiros
d376ba1c61 Move total MvB to the top.
Fix yAxis value.
Fix yAxis value.
Make disks smaller and transparent.
Change opacity on mouseover stack bars.
Add 4th column "sum of vsize" to tooltips table.
Add toggle show/hide tier fees.
Make progress active bar inline with text value.
Add a break line to the timestamp text.
Add colored progress bar with number.
2021-09-14 22:35:50 -03:00
Miguel Medeiros
388aa7fbe3 Fix y axis margin left. 2021-09-14 22:35:50 -03:00
Miguel Medeiros
34695146ee Change renderer to svg. 2021-09-14 22:35:50 -03:00
Miguel Medeiros
9020c618f0 Change renderer to svg.
Fix data structure of mempool graph.
Change tooltip total position (top).
Change tooltip visual of partial porcentage.
2021-09-14 22:35:49 -03:00
Miguel Medeiros
584d091d4e Fix indicator border-radius. 2021-09-14 22:35:49 -03:00
Miguel Medeiros
f434e50a2c Invert the tooltip legends order.
Fix default data to title tooltip MM/dd HH:mm.
Add symbol to tx chart tooltip .
Add accumulative total for tooltip information.
Add 3th column to tooltip with a progress bar.
Add and max span zoom span.
Add feeRate limit input to mempool graph component.
Add showZoom option to mempool graph component.
Remove start animation to match the layout for future SSR.
Remove mouse wheel zoom from small template.
Fix small template style.
2021-09-14 22:35:49 -03:00
Miguel Medeiros
1a7decb91d Add default data to title tooltip MM/dd HH:mm.
Add symbol to tx chart tooltip .
2021-09-14 22:35:48 -03:00
Miguel Medeiros
3574f8639e Add total sum to mempool chart.
Add zoom tools.
Add different theme for charts `big` and `small` (default).
Fix date format on mouseover.
Fix animations on graphs page.
Fix overflow tv page.
Remove `crosshair` on mouseover, changed to `line`.
Fix custom tooltip styles.
Remove inverted button (will add in a future PR).
Remove fee range labels (will add in a future PR).
Fix e2e testing.
2021-09-14 22:35:48 -03:00
Miguel Medeiros
9b956ff88d Add new component incoming-transactions-graph;
Refactor component mempool-graph;
Refactor component fee-distribution-graph;
Add incoming-transactions-graph to dashboard;
Add incoming-transactions-graph to statistics;
Add incoming-transactions-graph to television;
Add mempool-graph to dashboard;
Add mempool-graph to statistics;
Add mempool-graph to television;
Remove chartist.component;
2021-09-14 22:35:47 -03:00
Miguel Medeiros
1a98a14541 Add echart module. 2021-09-14 22:35:47 -03:00
wiz
0088e58c14 Merge pull request #776 from mempool/wiz/add-newsyslog-for-nginx 2021-09-11 19:20:30 +09:00
wiz
3fad765269 Add newsyslog.conf for nginx log rotation - delete logs after 90 days 2021-09-11 08:40:58 +09:00
softsimon
2e122a9be1 Merge pull request #771 from mempool/release/v2.2.2
Bump version number to v2.3.0-dev
2021-09-09 11:41:11 +04:00
wiz
2978d16148 Merge pull request #772 from mempool/wiz/fix-api-docs-for-raspberry-pi-users
Fix API docs examples for Raspberry Pi users using romanz/electrs
2021-09-09 14:44:10 +09:00
wiz
fc58bcb3bc Fix API docs examples for Raspberry Pi users using romanz/electrs 2021-09-09 11:11:01 +09:00
wiz
1696623e2f Bump version to v2.3.0-dev after shipping v2.2.2 2021-09-09 07:27:01 +09:00
wiz
251a1af442 Bump version number for v2.2.2 release 2021-09-09 07:23:36 +09:00
wiz
9bdf42530a Merge pull request #769 from mempool/wiz/fix-api-docs-fees-path
Fix api-docs incorrect API path for fees related methods
2021-09-08 07:29:36 +09:00
wiz
8525fbb177 Fix api-docs incorrect API path for fees related methods 2021-09-08 07:13:23 +09:00
wiz
63a3568481 Merge pull request #768 from mempool/simon/liquid-fetch-unconfidential
Liquid: Display unconfidential address and fix tracking
2021-09-08 06:37:24 +09:00
wiz
e4941740de Merge pull request #765 from mempool/simon/address-regex-fix
Updated address regex to handle all types of addresses.
2021-09-08 06:36:42 +09:00
softsimon
25bd33f7da validate-address API should be there both in esplora and bitcoind mode. 2021-09-07 13:13:29 +04:00
softsimon
2d007b9100 Liquid: Display unconfidential address and fix tracking
fixes #761
2021-09-06 10:20:31 +04:00
softsimon
b71330c606 Lowercase Segwit uppercase addresses for tracking matching. 2021-09-05 00:30:24 +04:00
softsimon
844b640c8c Merge pull request #760 from mempool/wiz/rename-keybase-channels
Update syslog.conf and upgrade/restart scripts for new keybase channels
2021-09-04 23:31:28 +04:00
softsimon
1277e58e68 Updated address regex to handle all types of addresses.
fixes #301
fixes #750
2021-09-04 23:21:15 +04:00
wiz
fde6fe324a Merge pull request #764 from mempool/simon/electrum-error-msg-fix
Handle string error messages.
2021-09-04 09:17:46 +09:00
wiz
4ed114a4d5 Merge pull request #762 from mempool/simon/npm-audit-fix-2021-09-03
Npm audit fix.
2021-09-04 09:16:56 +09:00
wiz
8c2dfea6a6 Merge pull request #716 from MiguelMedeiros/documentation-api
Improvements to API documentation and examples
2021-09-04 09:10:59 +09:00
Miguel Medeiros
a0624df06b Change websocket examples. 2021-09-03 20:13:31 -03:00
Miguel Medeiros
1eedcf900b Fix transaction post curl example. 2021-09-03 19:43:28 -03:00
softsimon
0b077d6fda Handle string error messages.
fixes #763
2021-09-04 01:32:36 +04:00
Miguel Medeiros
80047313e7 Remove unused variables. 2021-09-03 16:50:45 -03:00
Miguel Medeiros
71229b94c8 Set default active tab to liquid network. 2021-09-03 16:48:37 -03:00
Miguel Medeiros
c256daf8c8 Fix document location protocol for curl url. 2021-09-03 16:22:39 -03:00
Miguel Medeiros
ba0fb996d2 Fix curl placeholder url depending on base_module.
Fix currencies wrapper url variable name.
2021-09-03 16:02:05 -03:00
Miguel Medeiros
5977e96034 Fix typo variable name. 2021-09-03 14:35:06 -03:00
Miguel Medeiros
a151c5cddd Add template to documentation.
Add support for BASE_MODULE=[mempool, bisq, liquid].
 Add print results do CommonJS examples.
 Add support for custom domains.
 Remove basecurrency from /volume endpoint.
2021-09-03 07:04:19 -03:00
softsimon
0323fd966d Npm audit fix. 2021-09-03 00:44:23 +04:00
wiz
beb834bc30 Update syslog.conf and upgrade/restart scripts for new keybase channels 2021-09-02 19:30:54 +09:00
wiz
ad6503c7b3 Merge pull request #755 from knorrium/fix_dashboard_memory_leak
Add a potential fix for the memory leak on the Dashboard
2021-09-02 19:12:42 +09:00
softsimon
f8c11c8b6b Merge pull request #759 from knorrium/cypress_831
Update Cypress to v8.3.1
2021-09-02 13:45:12 +04:00
Felipe Knorr Kuhn
ba5421e77b Add some search tests (#758) 2021-09-02 13:42:18 +04:00
Felipe Knorr Kuhn
20fa803cee Add a potential fix for the memory leak on the Dashboard
Fix the broken experience after unsubscribing for network changes

Fix the broken experience after unsubscribing for network changes
2021-09-02 00:47:00 -07:00
Felipe Knorr Kuhn
393fa78a43 Increase waitForSkeletonGone timeout to 15s 2021-09-01 21:09:14 -07:00
Felipe Knorr Kuhn
3f290dae06 Upgrade Cypress to v8.3.1 2021-09-01 21:08:10 -07:00
wiz
24d18b9f2f Merge pull request #757 from mempool/wiz/revert-search-input-lowercase-conversion
Revert "Support uppercase addresses when searching."
2021-09-02 01:37:56 +09:00
wiz
79ef8ca371 Revert "Support uppercase addresses when searching."
This reverts commit fc28b06a0f.
2021-09-02 00:57:43 +09:00
softsimon
ec12f21113 Backend: Bumping Typescript version to 4.4.2 (#748)
* Backend: Bumping Typescript version to 4.4.2

* Replacing any types with instanceOf checks.
2021-08-31 15:09:33 +03:00
Priyansh
2e8ecc7277 Made Price feed update configurable (#751) 2021-08-29 22:30:11 +03:00
softsimon
fc28b06a0f Support uppercase addresses when searching.
fixes #301
2021-08-29 15:58:39 +03:00
softsimon
8fdbfdc04c Use block cache when searching or opening a recent block. (#749)
* Use block cache when searching or opening a recent block.

fixes #715

* Fixed linting errors.
2021-08-29 04:55:46 +03:00
Felipe Knorr Kuhn
bdfcfc96a8 Add script to pull digests from docker images (#705) 2021-08-27 19:04:51 +09:00
wiz
bb8649bc81 Merge pull request #747 from knorrium/be_dockerfile_fixes
Fix non-deterministic TypeScript version on Dockerfile
2021-08-27 17:08:04 +09:00
Felipe Knorr Kuhn
777e3d58b7 Fix non-deterministic TypeScript version on Dockerfile 2021-08-27 00:28:05 -07:00
wiz
c552f1aab6 Pull from transifex 2021-08-27 14:28:51 +09:00
softsimon
c0f2fa3042 Merge pull request #746 from MiguelMedeiros/bugfix-difficulty-adjustment-calc
Bugfix: difficulty adjustment calculation.
2021-08-26 03:27:59 +03:00
Miguel Medeiros
05936f82bd Refactor getDifficultyChange endpoint. 2021-08-25 21:14:01 -03:00
Miguel Medeiros
c7db81c97c Refactor difficulty adjustment calculation. 2021-08-25 17:18:30 -03:00
softsimon
bd1a37b8ef Correcting keypress arrow left test. 2021-08-25 18:41:35 +03:00
softsimon
efc4e6a8ed Fix for multiple arrow navigation bugs. (#741)
* Fix for multiple arrow navigation bugs.

fixes #731

* Updating test to handle left arrow navigation.

* Updating test to handle left arrow navigation.

* Arrow right click fix.

* Update frontend/cypress/integration/mainnet/mainnet.spec.ts

Co-authored-by: Felipe Knorr Kuhn <100320+knorrium@users.noreply.github.com>

Co-authored-by: Felipe Knorr Kuhn <100320+knorrium@users.noreply.github.com>
2021-08-25 15:44:55 +03:00
Felipe Knorr Kuhn
dd5d87e91e Add a test for not showing unblinding errors on regular TXs (#737) 2021-08-22 00:34:40 +03:00
wiz
ca6df488c5 Fix missing fetch command in upgrade script 2021-08-21 21:56:42 +09:00
wiz
1e018a6aa5 Fix typo/bug in mempool-logger script 2021-08-21 15:39:15 +09:00
wiz
0a627f96be Tweak production syslog configuration 2021-08-21 15:19:29 +09:00
wiz
17a8e67d8a Modify restart script to log restart events, don't restart services 2021-08-21 15:06:50 +09:00
wiz
815c2c5ad5 Modify upgrade script for PR branch deployment, tweak logging 2021-08-21 14:51:19 +09:00
softsimon
4376de85ff Liquid unblinding: Don't throw error as default for regular liquid transactions. 2021-08-21 03:13:39 +03:00
wiz
7e89de4612 Send deployment notifications to mempool.dev keybase group 2021-08-20 21:52:54 +09:00
wiz
4b72a14706 Merge pull request #735 from mempool/simon/bisq-tx-redirect-fix
Redirect unconfirmed bisq transactions to main website for tracking.
2021-08-20 21:25:13 +09:00
softsimon
b34f6fedb6 Redirect unconfirmed bisq transactions to main website for tracking. 2021-08-20 14:56:12 +03:00
Miguel Medeiros
58af0d78af Bugfix: Fix bisq dashboard tables overflow. (#733)
* Fix bisq dashboard tables overflow.

* Fix nav-item mobile margin.
2021-08-19 17:51:08 +03:00
Priyansh
ca13d9109c Updated mobile view for dropdown (#717)
Dropdown menu with dynamic positioning
2021-08-18 19:18:12 +03:00
Priyansh
e103fb5876 Updated significant digits of transaction fee (#722) 2021-08-18 16:27:35 +03:00
softsimon
58178f4563 Arrow bugfix: Unsubscribe all the observables when leaving view. 2021-08-18 15:59:18 +03:00
wiz
04f1879fd1 Add Unchained Capital as Enterprise Sponsor (#711) 2021-08-18 15:15:31 +03:00
softsimon
f5bc9ced0a Liquid unblinding: Replacing async/await with observable. 2021-08-18 14:05:40 +03:00
softsimon
7fe9993f91 Optimize performance of next/previous block. (#729) 2021-08-18 12:49:42 +03:00
softsimon
7c95339324 Merge pull request #728 from mempool/simon/unblinding-refactor-fix
Unblinding refactor fix
2021-08-18 04:09:53 +03:00
softsimon
006442f9de Merge pull request #727 from knorrium/improve_multisite_testing
Improve multisite testing
2021-08-18 03:35:43 +03:00
softsimon
e20100e437 Unblinding refactor fix 2021-08-18 03:34:17 +03:00
Felipe Knorr Kuhn
d7cf2b37d5 Update Liquid test data 2021-08-17 16:49:34 -07:00
Felipe Knorr Kuhn
278c2b9aae Fix typo on liquid setup 2021-08-17 16:38:51 -07:00
Felipe Knorr Kuhn
944246fcf5 Allow test jobs to run regardless of previous failures 2021-08-17 16:26:19 -07:00
Felipe Knorr Kuhn
03d87f4993 Add the Cypress env vars to the new test configs 2021-08-17 16:14:19 -07:00
Felipe Knorr Kuhn
cf8cab5f77 Temporarily enable cypress debug logs on GHA 2021-08-17 16:08:47 -07:00
Felipe Knorr Kuhn
49d1376647 Update cypress test config 2021-08-17 15:55:00 -07:00
Felipe Knorr Kuhn
de5518d262 update test specs to handle the new multisite setup on CI 2021-08-17 15:53:57 -07:00
Felipe Knorr Kuhn
7e4c51f47f Add new config targets for the multisite setup 2021-08-17 15:49:58 -07:00
softsimon
fe1d153632 Merge pull request #710 from MiguelMedeiros/feature-next-previous-block-arrows
UI/UX: `Next` and `Previous` button arrows for block navigation.
2021-08-18 00:57:39 +03:00
softsimon
a98f9ab80e Updating from transifex. 2021-08-18 00:54:34 +03:00
softsimon
867afaf265 Updating package lock file. 2021-08-18 00:50:18 +03:00
Rishabh
3d2ec64b14 Only display "Load all" if there are at least 3 more items to load (#724)
* Only display Load more if there are at least 3 more items to load

* Load more only if at least 3 more inputs
2021-08-18 00:49:08 +03:00
softsimon
bb407c0b42 Merge pull request #725 from mempool/simon/liquid-unblinding-refactor
Refactored liquid unblinding code into a new file.
2021-08-17 23:52:33 +03:00
softsimon
83c3d901c7 Merge pull request #726 from knorrium/update_devproxy
Update test infra to add initial support for the new multi-site setup.
2021-08-17 23:52:21 +03:00
Felipe Knorr Kuhn
901cee903c Update bisq tests to use the menu navigation 2021-08-17 13:02:24 -07:00
Felipe Knorr Kuhn
250ea09c7e Run generate config before running e2e tests locally 2021-08-17 13:01:36 -07:00
Felipe Knorr Kuhn
648d59631b Update local-prod target to use the new JS dev proxy 2021-08-17 13:01:04 -07:00
Felipe Knorr Kuhn
ed06e3c491 Add a new JS-based dev proxy for the new split up sites 2021-08-17 13:00:46 -07:00
Felipe Knorr Kuhn
3e8d646edd Fix update-config script to parse string values 2021-08-17 12:03:03 -07:00
softsimon
9c2c698575 Refactored liquid unblinding code into a new file. 2021-08-17 20:20:25 +03:00
softsimon
e2b0a286a4 Adding v2.2.1 dashboard screen shot. 2021-08-16 00:31:14 +03:00
softsimon
154809f0f9 Fix navigate to sponsor when base module is not mempool 2021-08-15 20:05:49 +03:00
softsimon
8d9a51a7c4 Readding search field, and fixing search for non-mempool base module sites. 2021-08-14 14:58:58 +03:00
softsimon
b3294369d4 Restoring Bisq Dao nav bar on Bisq module. 2021-08-14 13:25:54 +03:00
softsimon
53730920e3 Bugfix: Mempool block sizes were mixing up vsize and weight. 2021-08-14 03:24:31 +03:00
softsimon
d73b814277 Merge pull request #703 from priyanshiiit/median_fee
Get Median Fee on page reload
2021-08-14 02:25:35 +03:00
softsimon
dd0050c066 Merge pull request #669 from mempool/simon/configurable-main-module
Make base module and index.html file configurable with BASE_MODULE. A…
2021-08-14 02:25:07 +03:00
softsimon
ae51ee3e26 Removing issuance id test and fixing asset id test. 2021-08-14 02:21:38 +03:00
wiz
4b16e5d65f Add some basic title/descriptions for bisq.markets and liquid.network 2021-08-14 07:44:22 +09:00
softsimon
4f73bba132 Hide Mempool project description from non-mempool base module sites. 2021-08-14 01:37:28 +03:00
softsimon
3c229602e4 Use local about page component instead of external link. 2021-08-14 00:42:52 +03:00
softsimon
c74c902ebc Adding new preview images for Liquid and Bisq 2021-08-14 00:36:46 +03:00
wiz
8bfd315ba3 Rewrite production upgrade script to handle all 3 sites 2021-08-14 06:03:30 +09:00
softsimon
9d75c47792 Merge branch 'master' into simon/configurable-main-module
# Conflicts:
#	frontend/src/app/components/api-docs/api-docs.component.ts
#	frontend/src/app/components/blockchain-blocks/blockchain-blocks.component.ts
#	frontend/src/app/components/master-page/master-page.component.html
#	frontend/src/app/components/mempool-blocks/mempool-blocks.component.html
#	frontend/src/app/components/mempool-blocks/mempool-blocks.component.ts
#	frontend/src/app/dashboard/dashboard.component.html
2021-08-13 17:16:14 +03:00
wiz
e183be1a5c Update GitHub sponsor link to mempool.space/sponsor 2021-08-13 08:41:35 +09:00
wiz
7e273ce63d Bump version tags to v2.2.2-dev 2021-08-13 07:56:14 +09:00
Miguel Medeiros
6d070e75b0 Add next and previous arrows to blocks. 2021-08-12 19:49:39 -03:00
wiz
af5e0d7cd6 Bump version to v2.2.1 2021-08-13 07:45:47 +09:00
wiz
a2f1003916 Pull from transifex 2021-08-13 06:22:11 +09:00
wiz
f4f96fd18e Fix typos in site.webmanifest for liquid.network 2021-08-12 20:57:33 +09:00
Miguel Medeiros
f3b470b63e Fix API docs example for POST /tx endpoint (#707)
* Fix post transactions example.
* Fix post tx endpoint.
2021-08-12 20:41:23 +09:00
wiz
398a72c1a6 Pull from transifex 2021-08-12 19:33:22 +09:00
softsimon
ddd6420d9b Updating Bisq markets logo and favicons. 2021-08-11 20:31:05 +03:00
Miguel Medeiros
d76f42296a Add new documentation for Liquid and Bisq. 2021-08-12 01:19:40 +09:00
wiz
45af88774f Pull from transifex 2021-08-12 00:49:33 +09:00
wiz
71c6b0e11d Remove typo'd extra line in nginx-mempool.conf - fixes #706 2021-08-12 00:47:42 +09:00
github2k20
47a6118ffb Get Median Fee on page reload 2021-08-11 00:17:25 +05:30
wiz
994eb378af Update production nginx-mempool.conf for donations API endpoint 2021-08-11 01:00:17 +09:00
wiz
34d46e8ca5 Pull from transifex 2021-08-11 00:29:46 +09:00
wiz
a940f7e3b4 Pull from transifex 2021-08-09 23:48:20 +09:00
softsimon
8c29395533 Resume tx tracking when network goes offline. (#702)
fixes #609
2021-08-09 13:01:29 +03:00
Miguel Medeiros
8208bbf0b7 UI/UX: Fix blockchain-blocks skeleton. (#697)
* Fix blockchain-blocks skeleton.

* Fix blockchain skeleton background.

* Fix mempool blockchain skeleton.

* Add e2e testing.
Add tsconfig.
Fix mempool fit to screen.

* Fix wrong return.
Fix e2e testing.

* Fix blockchainblocks connectionstate.
Add init action to websocket mock.
Add e2e testing for droping websock connection.

* Ref e2e code for websocket connection.
Fix blockchain blocks skeleton.

* Fix state connections.
Remove .only e2e tests.

* Fix mempool blocks skeleton.

* Add fit screen to empty blocks.
2021-08-09 03:43:03 +03:00
softsimon
dbd205b73f Fix: Block fee data wasn't visible unless at least 2 transactions. 2021-08-08 14:17:18 +03:00
softsimon
7ef4be26ed Use BLOCK_WEIGHT_UNITS instead of hard coded block size limit in all occations. 2021-08-08 04:19:54 +03:00
wiz
1223c58a98 Add missing --db-dir option in electrs-start-liquid script 2021-08-08 05:18:11 +09:00
wiz
7d3757676f Enable 'ca' locale for Catalan 2021-08-08 01:05:42 +09:00
wiz
073bd60ed8 Pull from transifex 2021-08-08 01:05:26 +09:00
wiz
18c38fc1c1 Pull strings from transifex 2021-08-08 00:58:58 +09:00
wiz
0eb95447bb Pull strings from transifex 2021-08-07 21:12:26 +09:00
softsimon
c6b1979391 Support Liquid 0.1 sat/vB fees on blocks. 2021-08-07 04:24:46 +03:00
softsimon
0f390e65a4 Assets page design improvements. 2021-08-07 03:25:35 +03:00
softsimon
5dc0f4e270 Use actual MEMPOOL_BLOCKS_AMOUNT value for amount of mempool blocks. 2021-08-07 03:07:32 +03:00
softsimon
223288cc52 Removing extra character. 2021-08-07 03:05:54 +03:00
softsimon
72a35200b3 Pulled from transifex. 2021-08-07 02:27:59 +03:00
softsimon
11817c04f7 Transaction and block header hex external URL should be relative to the network. 2021-08-06 23:45:54 +03:00
Miguel Medeiros
7a8b2db3fb UI/UX: Fix Blockchain skeleton preloader. (#696)
* Fix Blockchain skeleton preloader.

* Fix Mempool Blocks skeleton preloader.

* Add e2e test.

* Add shared command to cyrpress e2e test.
2021-08-06 14:09:47 +03:00
Priyansh
6d910a5e24 changed the order of columns in collapsed view (#695) 2021-08-06 14:08:44 +03:00
softsimon
e1f07884b9 Correcting favicon paths and color. 2021-08-05 19:25:13 +03:00
softsimon
e00e61edfa Updating liquid favicons. 2021-08-05 19:14:48 +03:00
softsimon
4f988e186a Updating liquid network logo. 2021-08-05 18:58:39 +03:00
wiz
1aa54faa35 Fix liquid.network and bisq.markets page titles in SEO services 2021-08-05 22:45:03 +09:00
softsimon
99adccf43c Pulled from transifex. 2021-08-05 14:15:37 +03:00
softsimon
0bb9247609 Handle 0.1 sat/vB base fee on the dashboard and backend. 2021-08-05 02:03:52 +03:00
softsimon
d841933b21 Sync blockstream asset registry when in liquid base module mode. 2021-08-05 01:31:22 +03:00
wiz
bc8b78a01b Update page titles in index.*.html and SEO service 2021-08-05 02:41:52 +09:00
softsimon
b0c708659b Merge pull request #690 from MiguelMedeiros/bugfix-titles-styles
UI: Fix Transaction h1 font-size.
2021-08-04 15:48:39 +03:00
Miguel Medeiros
e31b906084 Import scss from transaction component. 2021-08-04 09:09:28 -03:00
Miguel Medeiros
7249620471 Fix Bisq css page.
Refactor Bisq html page title classes.
2021-08-04 09:08:11 -03:00
Miguel Medeiros
dc9d5d0be3 Fix h1 fontsize. 2021-08-04 09:08:11 -03:00
softsimon
a9009d4de2 npm audit fix. 2021-08-04 14:34:28 +03:00
softsimon
a265787cd4 Bumping mempool.js. 2021-08-04 14:34:05 +03:00
softsimon
c6e72be483 Liquid proxy fix to work locally. 2021-08-04 14:21:15 +03:00
softsimon
4680519d2e Merge pull request #689 from knorrium/e2e_tweaks
e2e tweaks
2021-08-04 13:24:05 +03:00
Felipe Knorr Kuhn
5b17f88de2 disable video recording 2021-08-03 21:26:40 -07:00
Felipe Knorr Kuhn
a6d34ba4f1 remove firefox from test matrix 2021-08-03 21:20:05 -07:00
Felipe Knorr Kuhn
508c8b0be3 make serve:local-prod target not verbose 2021-08-03 21:19:25 -07:00
softsimon
ef7dd6c8fb Merge branch 'master' into simon/configurable-main-module 2021-08-03 18:41:43 +03:00
softsimon
f03249761b Updating i18n from transifex. 2021-08-03 18:38:34 +03:00
softsimon
cb5877ba0a Update i18n. 2021-08-03 18:37:31 +03:00
softsimon
96f14d2781 Flipping Merkle root and Bits location for more table alignment. 2021-08-03 18:35:49 +03:00
softsimon
8eb70416da Removing "raw block". 2021-08-03 18:15:33 +03:00
wiz
b9246a72f2 Add Foundry as Enterprise Sponsor (#685) 2021-08-03 18:00:18 +03:00
Priyansh
43e222b9df Raw Hex of Objects in Details Tab #616 (#682)
* Added Block Hex in Details

* Added Raw Tx in Transaction Details

* Backend Updates
2021-08-03 14:27:02 +03:00
wiz
5548d08a9e Remove debug env var for cypress testsuite runs 2021-08-03 12:20:55 +09:00
wiz
10fa39634e Update our Terms of Service, split Privacy Policy into its own page 2021-08-03 12:20:51 +09:00
wiz
e6b90385b2 Further tweak index.liquid.html metadata text 2021-08-02 21:42:02 +09:00
wiz
61181c6791 Set index.html metadata and SEO service title for liquid.network 2021-08-02 21:30:29 +09:00
wiz
d2cccd2422 Fix liquid favicons 2021-08-02 21:07:48 +09:00
wiz
b05ebe1598 Add missing route for /privacy-policy to liquid explorer routing 2021-08-02 20:59:31 +09:00
softsimon
d92827a411 Upgrade deprecated xi18n command to extract-i18n. 2021-08-02 14:49:02 +03:00
wiz
d061f7589c Update our Terms of Service, split Privacy Policy into its own page 2021-08-02 20:48:10 +09:00
softsimon
1c01094e07 Removing duplicate i18n string. 2021-08-02 14:48:08 +03:00
wiz
f28a85f91b Hush a noisy bisq error message down to info 2021-08-02 16:57:49 +09:00
softsimon
15903faf49 Merge branch 'master' into simon/configurable-main-module
# Conflicts:
#	frontend/src/app/components/blockchain/blockchain.component.ts
2021-08-02 00:24:09 +03:00
softsimon
4895343d4e Perform a blockchain sync check before updating initial difficulty ad… (#677)
* Perform a blockchain sync check before updating initial difficulty adjustment.

fixes #603

* Updating logger messages.
2021-08-01 15:49:26 +03:00
Miguel Medeiros
a0559cbb24 Fix time until component round for week interval. (#679)
* Fix time until component round for week interval.

* Add forceFloorOnTimeIntervals parameter.
2021-08-01 01:25:24 +03:00
Miguel Medeiros
0293ba4a52 Remove feeRange check. (#678) 2021-07-31 20:11:50 +03:00
Miguel Medeiros
8b0d1db776 Fix concurrent asynchronous calls. (#675)
* Fix concurrent asynchronous calls.

* Remove test without mempool info websocket.

* Remove isloading$ variable.
2021-07-31 19:40:15 +03:00
softsimon
1908b1a5a6 Adding configuration for blocks and mempool blocks amount. 2021-07-31 17:56:10 +03:00
softsimon
037f472f8c Make Block Weight Unit configurable in frontend+backend. 2021-07-31 17:30:35 +03:00
softsimon
a32c1f40b1 Restoring About page. Fix for KEEP_BLOCKS_AMOUNT setting. Show up to 2 mempool blocks. 2021-07-30 23:14:45 +03:00
Miguel Medeiros
837e714b1f Fix show blocks on small screen. (#674) 2021-07-30 02:28:43 +03:00
wiz
91a37d8fe8 Add [push, pull_request] to cypress GHA workflow 2021-07-29 23:58:25 +09:00
softsimon
a00aa27ae4 Fix API doc page for Bisq. 2021-07-29 16:14:36 +03:00
Miguel Medeiros
226e72451c Fix colorized unblinded transaction. (#671) 2021-07-29 13:37:17 +03:00
softsimon
544be77bdc Liquid asset search bug fix. 2021-07-29 13:10:06 +03:00
softsimon
b8a110a772 Liquid fixes for latest transactions and API Doc. 2021-07-29 13:06:08 +03:00
wiz
7788a2d6bd Add other domain names to Terms of Service header 2021-07-29 18:38:49 +09:00
softsimon
da17fd16fa Liquid blockchain container position. 2021-07-29 12:36:00 +03:00
softsimon
e670f80fed Liquid dashboard updates. About page link. 2021-07-29 12:32:54 +03:00
wiz
857a5ff6fc Add missing asset_registry_db repo path for liquid electrs backend
Fixes #649
2021-07-29 17:49:42 +09:00
softsimon
2de28b9926 Dynamic dropdown. 2021-07-28 22:32:13 +03:00
softsimon
e6f8cf6cc8 Updating from transifex. 2021-07-27 19:51:38 +03:00
softsimon
d7586af392 Make base module and index.html file configurable with BASE_MODULE. Adding bare Liquid module. 2021-07-27 17:10:38 +03:00
wiz
35881b2457 Add customized index.html for bisq.markets entrypoint 2021-07-27 21:38:13 +09:00
Felipe Knorr Kuhn
59cd80b6d1 remove windows from test matrix (#666) 2021-07-27 02:47:32 +03:00
Miguel Medeiros
735c2ba587 Bugfix: Dashboard preloading skeleton. (#668)
* Change green color.

* Fix dashboard preloading components.
2021-07-27 02:47:08 +03:00
softsimon
be1ef43cd1 Updating i18n messages. 2021-07-26 22:02:24 +03:00
Felipe Knorr Kuhn
34ad88d3d0 update indentation (#664) 2021-07-26 22:00:53 +03:00
Miguel Medeiros
751c7d6e69 Bugfix: Dashboard - Difficulty adjustment component. (#663)
* Add color to previous retarget.
Add absolute number pipe.
Change plus and minus signs to fa icons.
Change Fee Estimate title to Transactions Fees.
Set min and max difficulty adjustments.

* Add projectID to cypress conf.

* Change icon to fa-caret.

* Remove unecessary icons.
2021-07-26 22:00:40 +03:00
Felipe Knorr Kuhn
60d8697b09 Cypress browser matrix (#665)
* use cypress matrix

* fix workflow indentation

* fix workflow job name

* add dummy containers for parallelization
2021-07-27 03:23:35 +09:00
wiz
41aa1248be Pass GITHUB_TOKEN to Cypress workflows, revert back to on "push" 2021-07-27 01:48:53 +09:00
wiz
cedd94c654 Set GitHub Action for Cypress to pull_request instead of push 2021-07-26 15:47:13 +09:00
wiz
bf13994d28 Remove duplicate trademark notice in LICENSE 2021-07-26 15:24:12 +09:00
Felipe Knorr Kuhn
8a44ccc55d small formatting fix to trigger more tests (#660) 2021-07-26 01:49:40 +03:00
softsimon
81df40681f Updating translations. 2021-07-25 21:18:35 +03:00
Felipe Knorr Kuhn
9e46cde9b7 Updates to the e2e suite (#659)
* initial version of the update config script

* fix duplicated content

* update cypress ci settings

* add workflow to run e2e tests when pushing

* record cypress results to the dashboard

* pull the cypress record key and project id from the secrets

* add start-server-and-test to replace concurrently

* replace concurrently with start-server-and-test

* remove concurrently

* add new cypress target to record

* update cypress to 7.7.0

* add tests for signet

* add tests for testnet

* run tests on chrome and firefox

* update test matrix: add edge and run firefox on container

* fix copypasta

* update docker image for firefox

* fix task name again

* fix edge tests task name

* improve bisq tests

* update workflow config

* enable cypress debug logs

* add a manual trigger for the e2e tests

* add config:defaults target

* use more of the GHA options

* fix config command

* add cypress-fail-on-console-error

* upgrade cypress to v8.0.0

* add helper to wait for the loader skeleton to be gone

* use skeleton waiter on the tests

* remove manual test trigger

* fix tv test when only one mempool block is available

* add waiter for pagination

* add extra steps to debug firefox launch issue

* remove whoami step

* Revert "upgrade cypress to v8.0.0"

This reverts commit cb3ff7d906.

* remove userinfo debug step

* enable test retries in run mode

* update proxy config to reduce ECONNRESET errors

* add mock-socket dev dependency

* add helpers to mock websockets and detect page idleness

* stabilize mainnet tests

* fix tv mode test on Liquid

* add basic tests for the mainnet status page

* cleanup mainnet tests

* update bisq tests

* update signet tests

* update testnet tests

* add initial support for parameterized websocket mocks

* move testing dependencies to optionalDependencies

* comment out mempool size check until the live updates are fixed

* comment out tx regex test

* update fixture for the new difficulty adjustment component

* fix the assertions on the status page
2021-07-25 21:03:47 +03:00
softsimon
723034b3d3 Status page wasn't updated due to multiple want events.
fixes #658
2021-07-25 19:43:06 +03:00
wiz
59898f1269 Patch sysconf dep for blockstream/electrs build in start scripts 2021-07-25 15:20:35 +09:00
softsimon
195b9bf542 Bumping the mempool-js lib. 2021-07-25 02:32:31 +03:00
softsimon
0333d91b15 Updating from transfex. 2021-07-25 01:49:35 +03:00
softsimon
f0bd487ea9 Update i18n messages. 2021-07-25 01:35:12 +03:00
Miguel Medeiros
cd8e308870 Add previous adjustment retarget. (#655)
* Add previous adjustment retarget.

* Fix green color.
Add + symbol to difficulty change.

* Add previousRetarget to websocket.

* Add previous retarget.
2021-07-25 01:26:48 +03:00
Miguel Medeiros
f6a889298c Bugfix: Change mempool block time precision. (#650)
* Fix time precision.

* Fix rounding numbers only for minutes range.
Fix reflected avg time to ETA transactions.

* Fix now variable update.
2021-07-25 01:26:29 +03:00
Miguel Medeiros
11f5e99187 Doc: Add new endpoints to api documentation. (#654)
* Add difficulty adjustment api doc.
Change fee tab to general tab.

* Add block header examples.

* Change tab orders.
Add fees tabs.
Change CPFP instructions to Transactions tab.

* Reorder alphabetically.
Fix typo.
2021-07-24 23:00:11 +03:00
wiz
334f9358b0 Add new page for Trademark Policy and Guidelines (#647)
* Add new page for Trademark Policy and Guidelines

* Fix attribution footer at bottom of Trademark Policy

* Add our Trademark Notice and Trademark Policy URL to LICENSE

* Last minute fixes to Trademark Policy and Guidelines page
2021-07-24 22:40:11 +03:00
wiz
820561610a Merge pull request #642 from unruhschuh/patch-2
fixed rsync command for frontent
2021-07-25 04:08:25 +09:00
wiz
2c895e7b03 Merge pull request #643 from mempool/wiz/nginx-cache-lang-updates
Update nginx configuration for cache settings and new locales
2021-07-24 03:21:21 +09:00
wiz
f36f48b11c Add Marina Wallet as Community Integration on About page (#651)
* Add Marina Wallet as Community Integration on About page

* Shift logo for Marina wallet by a few pixels on About page
2021-07-23 21:12:48 +03:00
wiz
f12f1b4a4e Merge pull request #641 from unruhschuh/patch-1 2021-07-23 20:56:19 +09:00
softsimon
037d6a75ea Adding previous difficulty retarget to the difficulty adjustment api. (#652)
refs #640
2021-07-23 14:35:04 +03:00
softsimon
775323de3e Removing angular CLI analytics. 2021-07-22 15:37:40 +03:00
Miguel Medeiros
d91dfa2f41 Check if feeRange is undefined. (#636) 2021-07-21 18:35:27 +03:00
softsimon
3ac06bb983 Updating i18n from transifex. Moving hindi location. 2021-07-20 15:43:01 +03:00
Miguel Medeiros
1ba0075829 Feature: Reflect difficulty estimation into mempool blocks. (#637)
* Add time until to mempool blocks.
Reflect difficulty estimate time.

* Fix estimate calculation.
Turn off the auto refresh.

* Change Math.floor to Math.round.
2021-07-20 15:04:53 +03:00
Miguel Medeiros
95436d398d Fix undefined asset and colored coinbase tx. (#645) 2021-07-19 23:13:34 +03:00
wiz
f2f5749769 Update nginx configuration for cache settings and new locales
* Consolidates add_header statements into single top-level section
* Updates locales to match frontend/src/app/app.constants.ts
* Re-orders locales to match locale selector for easier checking
2021-07-19 18:36:13 +09:00
softsimon
cb90b09a0e Changing block header link to icon. Setting api response header to match electrs. 2021-07-19 02:34:01 +03:00
Rishabh
2e54f4ca94 Added missing block header API (#630)
* header API frontend

* Block Header API endpoint added to Node.js backend

* updated package-lock.json

Co-authored-by: Rishabh <rishabh@Rajeshs-MacBook-Pro.local>
2021-07-19 02:26:16 +03:00
softsimon
853e2fcb8f Minor fixes to difficulty adjustment api. 2021-07-19 00:50:09 +03:00
Priyansh
9e0a5300b0 Expose the difficulty adjustment information in an API #622 (#628)
* Added difficulty adjustment information API

* Added Difficulty API in API docs frontend

* Added link to API

* Updated the API implementation of difficulty-adjustment

* Updated API End Point in frontend

* Updated sample API response in frontend
2021-07-19 00:45:45 +03:00
Thomas Leitz
1b5930887c fixed rsync command for frontent
nginx-mempool.conf has "root /var/www/mempool/browser;"
2021-07-18 23:20:28 +02:00
Thomas Leitz
5b39c018db Fixed 'cp' command for nginx.conf and nginx-mempool.conf
The destination path was a file, should be a directory.
2021-07-18 22:54:47 +02:00
Miguel Medeiros
ad08c3a907 Add min-height to mempool-info-data. (#639) 2021-07-18 16:42:02 +03:00
Miguel Medeiros
08328cbf0f Bugfix: Overflow in difficulty adjustment component. (#638)
* Remove green progress bar.

* Fix itens overflow.
2021-07-18 15:47:47 +03:00
Miguel Medeiros
03ce592ab0 Fix time-span calculation. (#635) 2021-07-18 15:42:59 +03:00
softsimon
21db5a4102 Removing shortened date i18n strings. 2021-07-18 01:02:02 +03:00
softsimon
7234734056 Updated "mins per block" i18n string. 2021-07-17 18:23:50 +03:00
softsimon
7bf9d604b9 Reusing hard coded In~1 min with base date minute i18n string. 2021-07-17 16:36:21 +03:00
softsimon
08fd4a4835 Updating from transifex. 2021-07-17 15:37:34 +03:00
softsimon
9a715871c5 Updating i18n strings. 2021-07-17 14:59:10 +03:00
Miguel Medeiros
d405334109 UI/UX - New component for difficult adjustment. (#602)
* Add next difficulty blocks.
Add next difficulty target date.
Add next difficulty total progress.
Add ajustment difficulty avg min per block.

* Fix typo.

* Trigger difficulty calculation every 5 seconds.

* Add rxjs timer to difficultyEpoch.

* Fix pipe.

* Fix small bar position.

* Change i18n strings.

* Fix typo.

* Add time-until component.

* Speed up difficultyEpoch timer to 1000 ms.

* Fix values to 2 decimal places.

* Add title to fee and difficulty adjustment cards.

* Add title outside the card.

* Fix title to center position.

* Add other titles.

* Add new transalations strings.
Refactor time span component.

* Fix difficulty adjustment i18n string.
Fix duplicated i18n strings.
2021-07-17 14:58:16 +03:00
Miguel Medeiros
38aee1a897 UI/UX - Scroll by clicking on the pagination button. (#613)
* Add scrollIntoView when click on pagination.

* Add padding top.

* Fix access DOM from ViewChild.

* Fix scrolling position.

* Fix chrome and firefox compatibility.
2021-07-16 15:33:22 +03:00
Miguel Medeiros
52aea12f22 UI/UX - Fix arrow position. (#627)
* Fix arrow position.

* Add arrows from font-awesome.

* Add icons to bisq transfers.

* Fix icon size in mobile view.
2021-07-15 23:23:37 +03:00
softsimon
ecbd18087b Effective fee could go below 0 due to rounding error. (#623)
fixes #606
2021-07-14 22:42:48 +03:00
softsimon
d13e18a72a Fix for liquid network redirect in staging proxy. 2021-07-14 14:40:31 +03:00
softsimon
8749b8b0fa Updating @mempool/node-bitcoin to support new methods 2021-07-13 18:43:10 +03:00
softsimon
f2e0a71b01 Only display Trade Mark sign on english language. (#608) 2021-07-13 12:00:05 +03:00
softsimon
b4eea3dc72 Updating from transifex. 2021-07-13 11:49:46 +03:00
softsimon
cdfc03f352 Adding Hindi 2021-07-13 11:49:04 +03:00
Miguel Medeiros
2c5ccab77c UI/UX - Blocks not visible on the TV page. (#626)
* Fix blocks not visible on the TV page.

* Add e2e testing for tv screen.
2021-07-12 17:19:58 +03:00
softsimon
80d76ad1f4 Updating from transifex. 2021-07-11 22:06:14 +03:00
softsimon
9a2428ad79 Update i18n. 2021-07-10 18:20:15 +03:00
Miguel Medeiros
71cf41362f UI/UX - Add skeleton for blocks preload. (#615)
* Add skeleton for blocks preload.

* Add e2e testing for skeleton blocks preloader.

* Fix reduce mempool blocks to fit the screen.

* Fix variable naming.
2021-07-10 16:04:15 +03:00
Miguel Medeiros
652f88770e Fix mouse over tooltip width. (#614) 2021-07-07 22:20:17 +03:00
Miguel Medeiros
7de2cf89f4 Fix table overflow. (#612)
fixes #303
2021-07-07 15:22:25 +03:00
softsimon
d7a827ba7f Update from transifex. 2021-07-06 20:05:59 +03:00
Miguel Medeiros
9dae7020c8 Liquid support for unblinding transactions. (#588)
* Add docker file to generate wallycore wasm js lib.

* Add unblinded liquid transactions.

* Add background to unblided transactions.

* Check liquid network to try to unblind tx.

Ww don't want to try to unblind transactions in other networks.

Co-authored-by: Felipe Knorr Kuhn <100320+knorrium@users.noreply.github.com>

* Delete libwally-core dockerfile.

* Delete wallycore.html.

* Fix validation unblind tx.
Fix lint.
Add errorUnblinded.
Add vin.prevout unblinded tx.

* Add e2e testing to liquids unblinded tx.

* Load libwally.js dynamically.

* Fix table size.

* Add Blockstream License to libwally and wallycore.

Co-authored-by: Felipe Knorr Kuhn <100320+knorrium@users.noreply.github.com>
2021-07-06 19:56:32 +03:00
softsimon
3ae3df6722 Revert "Parse TXID, hash or address strings from search bar and allow searching for TXID:OUTPUT. (#578)" (#610)
This reverts commit 2e2e6aa01f.
2021-07-06 19:55:01 +03:00
softsimon
2e2e6aa01f Parse TXID, hash or address strings from search bar and allow searching for TXID:OUTPUT. (#578)
fixes #450
fixes #415
2021-07-06 19:43:18 +03:00
Miguel Medeiros
1e9f131a2a Fix pagination responsive layout. (#590)
* Fix pagination responsive css.

* Fix css title block transaction alignment.

* Add pagination responsive layout to bisq tx page.

* Add pagination responsive  to bisq blocks page.

* Fix pagination css - bisq txs page.

* Add e2e tests for bisq and mainnet pagination.
2021-07-05 22:28:56 +03:00
wiz
5197a15e31 Merge pull request #596 from knorrium/skip_cypress_on_docker
skip downloading the Cypress binary on Docker
2021-07-04 07:02:05 +09:00
wiz
1d29fad986 Bump version to v2.2.1-dev 2021-07-03 14:49:59 -07:00
Felipe Knorr Kuhn
f6e4907128 skip downloading the Cypress binary on Docker 2021-06-26 16:48:57 -07:00
319 changed files with 78655 additions and 43926 deletions

2
.github/FUNDING.yml vendored
View File

@@ -9,4 +9,4 @@ community_bridge: # Replace with a single Community Bridge project-name e.g., cl
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: ['https://mempool.space/about'] # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
custom: ['https://mempool.space/sponsor'] # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']

80
.github/workflows/cypress.yml vendored Normal file
View File

@@ -0,0 +1,80 @@
name: Cypress Tests
on: [push, pull_request]
jobs:
cypress:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
containers: [1, 2, 3, 4, 5]
os: ["ubuntu-latest"]
browser: [chrome]
name: E2E tests on ${{ matrix.browser }} - ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: 16.10.0
cache: 'npm'
cache-dependency-path: frontend/package-lock.json
- name: ${{ matrix.browser }} browser tests (Mempool)
uses: cypress-io/github-action@v2
with:
working-directory: frontend
build: npm run config:defaults:mempool
start: npm run start:local-prod
wait-on: 'http://localhost:4200'
wait-on-timeout: 120
record: true
parallel: true
group: Tests on ${{ matrix.browser }} (Mempool)
browser: ${{ matrix.browser }}
ci-build-id: '${{ github.sha }}-${{ github.workflow }}-${{ github.event_name }}'
env:
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CYPRESS_PROJECT_ID: ${{ secrets.CYPRESS_PROJECT_ID }}
- name: ${{ matrix.browser }} browser tests (Liquid)
uses: cypress-io/github-action@v2
if: always()
with:
working-directory: frontend
build: npm run config:defaults:liquid
start: npm run start:local-prod
wait-on: 'http://localhost:4200'
wait-on-timeout: 120
record: true
parallel: true
spec: cypress/integration/liquid/liquid.spec.ts
group: Tests on ${{ matrix.browser }} (Liquid)
browser: ${{ matrix.browser }}
ci-build-id: '${{ github.sha }}-${{ github.workflow }}-${{ github.event_name }}'
env:
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CYPRESS_PROJECT_ID: ${{ secrets.CYPRESS_PROJECT_ID }}
- name: ${{ matrix.browser }} browser tests (Bisq)
uses: cypress-io/github-action@v2
if: always()
with:
working-directory: frontend
build: npm run config:defaults:bisq
start: npm run start:local-prod
wait-on: 'http://localhost:4200'
wait-on-timeout: 120
record: true
parallel: true
spec: cypress/integration/bisq/bisq.spec.ts
group: Tests on ${{ matrix.browser }} (Bisq)
browser: ${{ matrix.browser }}
ci-build-id: '${{ github.sha }}-${{ github.workflow }}-${{ github.event_name }}'
env:
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CYPRESS_PROJECT_ID: ${{ secrets.CYPRESS_PROJECT_ID }}

1
.nvmrc Normal file
View File

@@ -0,0 +1 @@
v16.10.0

4
.vscode/settings.json vendored Normal file
View File

@@ -0,0 +1,4 @@
{
"editor.tabSize": 2,
"typescript.tsdk": "./backend/node_modules/typescript/lib"
}

View File

@@ -12,8 +12,13 @@ the terms of (at your option) either:
Foundation, either version 3 of the License or any later version approved by a
proxy statement published on <https://mempool.space/about>.
However, these licenses do not grant you any rights to use the "mempool.space"
trademarks or logos, or any other trademarks of Mempool Space K.K.
However, this copyright license does not include an implied right or license to
use our trademarks: The Mempool Open Source Project™, mempool.space™, the
mempool Logo™, the mempool.space Vertical Logo™, the mempool.space Horizontal
Logo™, the mempool Square Logo™, and the mempool Blocks logo™ are registered
trademarks or trademarks of Mempool Space K.K in Japan, the United States,
and/or other countries. See our full Trademark Policy and Guidelines for more
details, published on <https://mempool.space/trademark-policy>.
This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A

View File

@@ -1,8 +1,8 @@
# The Mempool Open Source Project
# The Mempool Open Source Project
Mempool is the fully featured visualizer, explorer, and API service running on [mempool.space](https://mempool.space/), an open source project developed and operated for the benefit of the Bitcoin community, with a focus on the emerging transaction fee market to help our transition into a multi-layer ecosystem.
![mempool](https://mempool.space/resources/screenshots/v2.2.0-dashboard.png)
![mempool](https://mempool.space/resources/screenshots/v2.3.0-dashboard.png)
## Installation Methods
@@ -20,11 +20,11 @@ The following instructions are for a manual installation on Linux or FreeBSD. Th
## Dependencies
* Bitcoin Core (no pruning, txindex=1)
* Electrum Server (romanz/electrs)
* NodeJS (official stable LTS)
* MariaDB (default config)
* Nginx (use supplied nginx.conf and nginx-mempool.conf)
* [Bitcoin](https://github.com/bitcoin/bitcoin)
* [Electrum](https://github.com/romanz/electrs)
* [NodeJS](https://github.com/nodejs/node)
* [MariaDB](https://github.com/mariadb/server)
* [Nginx](https://github.com/nginx/nginx)
## Mempool
@@ -41,7 +41,7 @@ Clone the mempool repo, and checkout the latest release tag:
Enable RPC and txindex in `bitcoin.conf`:
```bash
rpcuser=mempool
rpcpassword=71b61986da5b03a5694d7c7d5165ece5
rpcpassword=mempool
txindex=1
```
@@ -54,7 +54,7 @@ Install MariaDB from OS package manager:
# macOS
brew install mariadb
brew services start mariadb
mysql.server start
```
Create database and grant privileges:
@@ -80,7 +80,7 @@ Install mempool dependencies from npm and build the backend:
```bash
# backend
cd backend
npm install
npm install --prod
npm run build
```
@@ -96,18 +96,18 @@ Edit `mempool-config.json` to add your Bitcoin Core node RPC credentials:
"MEMPOOL": {
"NETWORK": "mainnet",
"BACKEND": "electrum",
"HTTP_PORT": 8999,
"API_URL_PREFIX": "/api/v1/",
"POLL_RATE_MS": 2000
"HTTP_PORT": 8999
},
"CORE_RPC": {
"HOST": "127.0.0.1",
"PORT": 8332,
"USERNAME": "mempool",
"PASSWORD": "71b61986da5b03a5694d7c7d5165ece5"
"PASSWORD": "mempool"
},
"ELECTRUM": {
"HOST": "127.0.0.1",
"PORT": 50002,
"TLS_ENABLED": true,
"TLS_ENABLED": true
},
"DATABASE": {
"ENABLED": true,
@@ -116,10 +116,6 @@ Edit `mempool-config.json` to add your Bitcoin Core node RPC credentials:
"USERNAME": "mempool",
"PASSWORD": "mempool",
"DATABASE": "mempool"
},
"STATISTICS": {
"ENABLED": true,
"TX_PER_SECOND_SAMPLE_PERIOD": 150
}
}
```
@@ -160,14 +156,14 @@ Install mempool dependencies from npm and build the frontend static HTML/CSS/JS:
```bash
# frontend
cd frontend
npm install
npm install --prod
npm run build
```
Install the output into nginx webroot folder:
```bash
sudo rsync -av --delete dist/mempool/ /var/www/html/
sudo rsync -av --delete dist/mempool/ /var/www/
```
## nginx + certbot
@@ -176,10 +172,10 @@ Install the supplied nginx.conf and nginx-mempool.conf in /etc/nginx
```bash
# install nginx and certbot
apt-get install -y nginx python-certbot-nginx
apt-get install -y nginx python3-certbot-nginx
# install the mempool configuration for nginx
cp nginx.conf nginx-mempool.conf /etc/nginx/nginx.conf
cp nginx.conf nginx-mempool.conf /etc/nginx/
# replace example.com with your domain name
certbot --nginx -d example.com

4
backend/.vscode/settings.json vendored Normal file
View File

@@ -0,0 +1,4 @@
{
"editor.tabSize": 2,
"typescript.tsdk": "../backend/node_modules/typescript/lib"
}

View File

@@ -8,7 +8,12 @@
"POLL_RATE_MS": 2000,
"CACHE_DIR": "./cache",
"CLEAR_PROTECTION_MINUTES": 20,
"RECOMMENDED_FEE_PERCENTILE": 50
"RECOMMENDED_FEE_PERCENTILE": 50,
"BLOCK_WEIGHT_UNITS": 4000000,
"INITIAL_BLOCKS_AMOUNT": 8,
"MEMPOOL_BLOCKS_AMOUNT": 8,
"PRICE_FEED_UPDATE_INTERVAL": 3600,
"USE_SECOND_NODE_FOR_MINFEE": false
},
"CORE_RPC": {
"HOST": "127.0.0.1",
@@ -24,8 +29,7 @@
"ESPLORA": {
"REST_API_URL": "http://127.0.0.1:3000"
},
"CORE_RPC_MINFEE": {
"ENABLED": false,
"SECOND_CORE_RPC": {
"HOST": "127.0.0.1",
"PORT": 8332,
"USERNAME": "mempool",

View File

@@ -1,32 +1,32 @@
{
"name": "mempool-backend",
"version": "2.2.0",
"version": "2.3.0-dev",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "mempool-backend",
"version": "2.2.0",
"version": "2.3.0-dev",
"license": "GNU Affero General Public License v3.0",
"dependencies": {
"@mempool/bitcoin": "^3.0.2",
"@mempool/bitcoin": "^3.0.3",
"@mempool/electrum-client": "^1.1.7",
"axios": "^0.21.1",
"bitcoinjs-lib": "^5.2.0",
"@types/ws": "8.2.2",
"axios": "0.24.0",
"bitcoinjs-lib": "6.0.1",
"crypto-js": "^4.0.0",
"express": "^4.17.1",
"locutus": "^2.0.12",
"mysql2": "2.2.5",
"mysql2": "2.3.3",
"node-worker-threads-pool": "^1.4.3",
"ws": "^7.4.6"
"typescript": "4.4.4",
"ws": "8.3.0"
},
"devDependencies": {
"@types/compression": "^1.0.1",
"@types/express": "^4.17.2",
"@types/locutus": "^0.0.6",
"@types/ws": "^7.4.4",
"tslint": "^6.1.0",
"typescript": "^4.1.5"
"tslint": "^6.1.0"
}
},
"node_modules/@babel/code-frame": {
@@ -56,9 +56,9 @@
}
},
"node_modules/@mempool/bitcoin": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/@mempool/bitcoin/-/bitcoin-3.0.2.tgz",
"integrity": "sha512-WNHFTDJEEBmakSPAbrJ933mGgm1uYxmOElyQYZVW7D7CRUd8mKek+QlViin63e71vyfMVOGXtWwSb87dxghggQ==",
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/@mempool/bitcoin/-/bitcoin-3.0.3.tgz",
"integrity": "sha512-10UdbwchnevlebDTN+Xhv75AEhDmTMy9UgWHlqx5MG2mheFG6+eqmtHsdxeYnv3IAtTtlRfA6fY0RbV/x4TNFQ==",
"engines": {
"node": ">= 0.10.0"
}
@@ -137,8 +137,7 @@
"node_modules/@types/node": {
"version": "14.14.20",
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.20.tgz",
"integrity": "sha512-Y93R97Ouif9JEOWPIUyU+eyIdyRqQR0I8Ez1dzku4hDx34NWh4HbtIc3WNzwB1Y9ULvNGeu5B8h8bVL5cAk4/A==",
"dev": true
"integrity": "sha512-Y93R97Ouif9JEOWPIUyU+eyIdyRqQR0I8Ez1dzku4hDx34NWh4HbtIc3WNzwB1Y9ULvNGeu5B8h8bVL5cAk4/A=="
},
"node_modules/@types/qs": {
"version": "6.9.5",
@@ -163,11 +162,9 @@
}
},
"node_modules/@types/ws": {
"version": "7.4.4",
"resolved": "https://registry.npmjs.org/@types/ws/-/ws-7.4.4.tgz",
"integrity": "sha512-d/7W23JAXPodQNbOZNXvl2K+bqAQrCMwlh/nuQsPSQk6Fq0opHoPrUw43aHsvSbIiQPr8Of2hkFbnz1XBFVyZQ==",
"dev": true,
"license": "MIT",
"version": "8.2.2",
"resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.2.2.tgz",
"integrity": "sha512-NOn5eIcgWLOo6qW8AcuLZ7G8PycXu0xTxxkS6Q18VWFxgPUSOwV0pBj2a/4viNZVu25i7RIB7GttdkAIUUXOOg==",
"dependencies": {
"@types/node": "*"
}
@@ -211,11 +208,11 @@
"integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI="
},
"node_modules/axios": {
"version": "0.21.1",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz",
"integrity": "sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==",
"version": "0.24.0",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.24.0.tgz",
"integrity": "sha512-Q6cWsys88HoPgAaFAVUb0WpPk0O8iTeisR9IMqy9G8AbO4NlpVknrnQS03zzF9PGAWgO3cgletO3VjV/P7VztA==",
"dependencies": {
"follow-redirects": "^1.10.0"
"follow-redirects": "^1.14.4"
}
},
"node_modules/balanced-match": {
@@ -225,25 +222,17 @@
"dev": true
},
"node_modules/base-x": {
"version": "3.0.8",
"resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.8.tgz",
"integrity": "sha512-Rl/1AWP4J/zRrk54hhlxH4drNxPJXYUaKffODVI53/dAsV4t9fBxyxYKAVPU1XBHxYwOWP9h9H0hM2MVw4YfJA==",
"version": "3.0.9",
"resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.9.tgz",
"integrity": "sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ==",
"dependencies": {
"safe-buffer": "^5.0.1"
}
},
"node_modules/bech32": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz",
"integrity": "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ=="
},
"node_modules/bindings": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz",
"integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==",
"dependencies": {
"file-uri-to-path": "1.0.0"
}
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/bech32/-/bech32-2.0.0.tgz",
"integrity": "sha512-LcknSilhIGatDAsY1ak2I8VtGaHNhgMSYVxFrGLXv+xLHytaKZKcaUJJUE7qmBr7h33o5YQwP55pMI0xmkpJwg=="
},
"node_modules/bip174": {
"version": "2.0.1",
@@ -253,71 +242,23 @@
"node": ">=8.0.0"
}
},
"node_modules/bip32": {
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/bip32/-/bip32-2.0.6.tgz",
"integrity": "sha512-HpV5OMLLGTjSVblmrtYRfFFKuQB+GArM0+XP8HGWfJ5vxYBqo+DesvJwOdC2WJ3bCkZShGf0QIfoIpeomVzVdA==",
"dependencies": {
"@types/node": "10.12.18",
"bs58check": "^2.1.1",
"create-hash": "^1.2.0",
"create-hmac": "^1.1.7",
"tiny-secp256k1": "^1.1.3",
"typeforce": "^1.11.5",
"wif": "^2.0.6"
},
"engines": {
"node": ">=6.0.0"
}
},
"node_modules/bip32/node_modules/@types/node": {
"version": "10.12.18",
"resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.18.tgz",
"integrity": "sha512-fh+pAqt4xRzPfqA6eh3Z2y6fyZavRIumvjhaCL753+TVkGKGhpPeyrJG2JftD0T9q4GF00KjefsQ+PQNDdWQaQ=="
},
"node_modules/bip66": {
"version": "1.1.5",
"resolved": "https://registry.npmjs.org/bip66/-/bip66-1.1.5.tgz",
"integrity": "sha1-AfqHSHhcpwlV1QESF9GzE5lpyiI=",
"dependencies": {
"safe-buffer": "^5.0.1"
}
},
"node_modules/bitcoin-ops": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/bitcoin-ops/-/bitcoin-ops-1.4.1.tgz",
"integrity": "sha512-pef6gxZFztEhaE9RY9HmWVmiIHqCb2OyS4HPKkpc6CIiiOa3Qmuoylxc5P2EkU3w+5eTSifI9SEZC88idAIGow=="
},
"node_modules/bitcoinjs-lib": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/bitcoinjs-lib/-/bitcoinjs-lib-5.2.0.tgz",
"integrity": "sha512-5DcLxGUDejgNBYcieMIUfjORtUeNWl828VWLHJGVKZCb4zIS1oOySTUr0LGmcqJBQgTBz3bGbRQla4FgrdQEIQ==",
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/bitcoinjs-lib/-/bitcoinjs-lib-6.0.1.tgz",
"integrity": "sha512-x/7D4jDj/MMkmO6t3p2CSDXTqpwZ/jRsRiJDmaiXabrR9XRo7jwby8HRn7EyK1h24rKFFI7vI0ay4czl6bDOZQ==",
"dependencies": {
"bech32": "^1.1.2",
"bech32": "^2.0.0",
"bip174": "^2.0.1",
"bip32": "^2.0.4",
"bip66": "^1.1.0",
"bitcoin-ops": "^1.4.0",
"bs58check": "^2.0.0",
"bs58check": "^2.1.2",
"create-hash": "^1.1.0",
"create-hmac": "^1.1.3",
"merkle-lib": "^2.0.10",
"pushdata-bitcoin": "^1.0.1",
"randombytes": "^2.0.1",
"tiny-secp256k1": "^1.1.1",
"typeforce": "^1.11.3",
"varuint-bitcoin": "^1.0.4",
"varuint-bitcoin": "^1.1.2",
"wif": "^2.0.1"
},
"engines": {
"node": ">=8.0.0"
}
},
"node_modules/bn.js": {
"version": "4.11.9",
"resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz",
"integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw=="
},
"node_modules/body-parser": {
"version": "1.19.0",
"resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz",
@@ -348,11 +289,6 @@
"concat-map": "0.0.1"
}
},
"node_modules/brorand": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz",
"integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8="
},
"node_modules/bs58": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz",
@@ -487,19 +423,6 @@
"sha.js": "^2.4.0"
}
},
"node_modules/create-hmac": {
"version": "1.1.7",
"resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz",
"integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==",
"dependencies": {
"cipher-base": "^1.0.3",
"create-hash": "^1.1.0",
"inherits": "^2.0.1",
"ripemd160": "^2.0.0",
"safe-buffer": "^5.0.1",
"sha.js": "^2.4.8"
}
},
"node_modules/crypto-js": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.0.0.tgz",
@@ -514,9 +437,9 @@
}
},
"node_modules/denque": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/denque/-/denque-1.5.0.tgz",
"integrity": "sha512-CYiCSgIF1p6EUByQPlGkKnP1M9g0ZV3qMIrqMqZqdwazygIA/YP2vrbcyl1h/WppKJTdl1F85cXIle+394iDAQ==",
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/denque/-/denque-2.0.1.tgz",
"integrity": "sha512-tfiWc6BQLXNLpNiR5iGd0Ocu3P3VpxfzFiqubLgMfhfOw9WyvgJBd46CClNn9k3qfbjvT//0cf7AlYRX/OslMQ==",
"engines": {
"node": ">=0.10"
}
@@ -548,20 +471,6 @@
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
"integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0="
},
"node_modules/elliptic": {
"version": "6.5.4",
"resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz",
"integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==",
"dependencies": {
"bn.js": "^4.11.9",
"brorand": "^1.1.0",
"hash.js": "^1.0.0",
"hmac-drbg": "^1.0.1",
"inherits": "^2.0.4",
"minimalistic-assert": "^1.0.1",
"minimalistic-crypto-utils": "^1.0.1"
}
},
"node_modules/encodeurl": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
@@ -650,11 +559,6 @@
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
},
"node_modules/file-uri-to-path": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
"integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw=="
},
"node_modules/finalhandler": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz",
@@ -673,9 +577,9 @@
}
},
"node_modules/follow-redirects": {
"version": "1.13.1",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.1.tgz",
"integrity": "sha512-SSG5xmZh1mkPGyKzjZP8zLjltIfpW32Y5QpdNJyjcfGxK3qo3NDDkZOZSFiGn1A6SclQxY9GzEwAHQ3dmYRWpg==",
"version": "1.14.6",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.6.tgz",
"integrity": "sha512-fhUl5EwSJbbl8AR+uYL2KQDxLkdSjZGR36xy46AO7cOMTrCMON6Sa28FmAnC2tRTDbd/Uuzz3aJBv7EBN7JH8A==",
"funding": [
{
"type": "individual",
@@ -781,25 +685,6 @@
"node": ">=4"
}
},
"node_modules/hash.js": {
"version": "1.1.7",
"resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz",
"integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==",
"dependencies": {
"inherits": "^2.0.3",
"minimalistic-assert": "^1.0.1"
}
},
"node_modules/hmac-drbg": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz",
"integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=",
"dependencies": {
"hash.js": "^1.0.3",
"minimalistic-assert": "^1.0.0",
"minimalistic-crypto-utils": "^1.0.1"
}
},
"node_modules/http-errors": {
"version": "1.7.2",
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz",
@@ -937,11 +822,6 @@
"resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz",
"integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E="
},
"node_modules/merkle-lib": {
"version": "2.0.10",
"resolved": "https://registry.npmjs.org/merkle-lib/-/merkle-lib-2.0.10.tgz",
"integrity": "sha1-grjbrnXieneFOItz+ddyXQ9vMyY="
},
"node_modules/methods": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",
@@ -980,16 +860,6 @@
"node": ">= 0.6"
}
},
"node_modules/minimalistic-assert": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz",
"integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A=="
},
"node_modules/minimalistic-crypto-utils": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz",
"integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo="
},
"node_modules/minimatch": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
@@ -1026,13 +896,13 @@
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
},
"node_modules/mysql2": {
"version": "2.2.5",
"resolved": "https://registry.npmjs.org/mysql2/-/mysql2-2.2.5.tgz",
"integrity": "sha512-XRqPNxcZTpmFdXbJqb+/CtYVLCx14x1RTeNMD4954L331APu75IC74GDqnZMEt1kwaXy6TySo55rF2F3YJS78g==",
"version": "2.3.3",
"resolved": "https://registry.npmjs.org/mysql2/-/mysql2-2.3.3.tgz",
"integrity": "sha512-wxJUev6LgMSgACDkb/InIFxDprRa6T95+VEoR+xPvtngtccNH2dGjEB/fVZ8yg1gWv1510c9CvXuJHi5zUm0ZA==",
"dependencies": {
"denque": "^1.4.1",
"denque": "^2.0.1",
"generate-function": "^2.3.1",
"iconv-lite": "^0.6.2",
"iconv-lite": "^0.6.3",
"long": "^4.0.0",
"lru-cache": "^6.0.0",
"named-placeholders": "^1.1.2",
@@ -1044,9 +914,9 @@
}
},
"node_modules/mysql2/node_modules/iconv-lite": {
"version": "0.6.2",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.2.tgz",
"integrity": "sha512-2y91h5OpQlolefMPmUlivelittSWy0rP+oYVpn6A7GwVHNE8AWzoYOBNmlwks3LobaJxgHCYZAnyNo2GgpNRNQ==",
"version": "0.6.3",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
"integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==",
"dependencies": {
"safer-buffer": ">= 2.1.2 < 3.0.0"
},
@@ -1079,11 +949,6 @@
"resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz",
"integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI="
},
"node_modules/nan": {
"version": "2.14.2",
"resolved": "https://registry.npmjs.org/nan/-/nan-2.14.2.tgz",
"integrity": "sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ=="
},
"node_modules/negotiator": {
"version": "0.6.2",
"resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz",
@@ -1135,9 +1000,9 @@
}
},
"node_modules/path-parse": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz",
"integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==",
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
"integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",
"dev": true
},
"node_modules/path-to-regexp": {
@@ -1162,14 +1027,6 @@
"resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz",
"integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM="
},
"node_modules/pushdata-bitcoin": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/pushdata-bitcoin/-/pushdata-bitcoin-1.0.1.tgz",
"integrity": "sha1-FZMdPNlnreUiBvUjqnMxrvfUOvc=",
"dependencies": {
"bitcoin-ops": "^1.3.0"
}
},
"node_modules/qs": {
"version": "6.7.0",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz",
@@ -1178,14 +1035,6 @@
"node": ">=0.6"
}
},
"node_modules/randombytes": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz",
"integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==",
"dependencies": {
"safe-buffer": "^5.1.0"
}
},
"node_modules/range-parser": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
@@ -1382,22 +1231,6 @@
"node": ">=4"
}
},
"node_modules/tiny-secp256k1": {
"version": "1.1.6",
"resolved": "https://registry.npmjs.org/tiny-secp256k1/-/tiny-secp256k1-1.1.6.tgz",
"integrity": "sha512-FmqJZGduTyvsr2cF3375fqGHUovSwDi/QytexX1Se4BPuPZpTE5Ftp5fg+EFSuEf3lhZqgCRjEG3ydUQ/aNiwA==",
"hasInstallScript": true,
"dependencies": {
"bindings": "^1.3.0",
"bn.js": "^4.11.8",
"create-hmac": "^1.1.7",
"elliptic": "^6.4.0",
"nan": "^2.13.2"
},
"engines": {
"node": ">=6.0.0"
}
},
"node_modules/toidentifier": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz",
@@ -1473,10 +1306,9 @@
"integrity": "sha512-7uc1O8h1M1g0rArakJdf0uLRSSgFcYexrVoKo+bzJd32gd4gDy2L/Z+8/FjPnU9ydY3pEnVPtr9FyscYY60K1g=="
},
"node_modules/typescript": {
"version": "4.2.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.2.3.tgz",
"integrity": "sha512-qOcYwxaByStAWrBf4x0fibwZvMRG+r4cQoTjbPtUlrWjBHbmCAww1i448U0GJ+3cNNEtebDteo/cHOR3xJ4wEw==",
"dev": true,
"version": "4.4.4",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.4.4.tgz",
"integrity": "sha512-DqGhF5IKoBl8WNf8C1gu8q0xZSInh9j1kJJMqT3a94w1JzVaBU4EXOSMrz9yDqMT0xt3selp83fuFMQ0uzv6qA==",
"bin": {
"tsc": "bin/tsc",
"tsserver": "bin/tsserver"
@@ -1537,11 +1369,11 @@
"dev": true
},
"node_modules/ws": {
"version": "7.4.6",
"resolved": "https://registry.npmjs.org/ws/-/ws-7.4.6.tgz",
"integrity": "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==",
"version": "8.3.0",
"resolved": "https://registry.npmjs.org/ws/-/ws-8.3.0.tgz",
"integrity": "sha512-Gs5EZtpqZzLvmIM59w4igITU57lrtYVFneaa434VROv4thzJyV6UjIL3D42lslWlI+D4KzLYnxSwtfuiO79sNw==",
"engines": {
"node": ">=8.3.0"
"node": ">=10.0.0"
},
"peerDependencies": {
"bufferutil": "^4.0.1",
@@ -1590,9 +1422,9 @@
}
},
"@mempool/bitcoin": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/@mempool/bitcoin/-/bitcoin-3.0.2.tgz",
"integrity": "sha512-WNHFTDJEEBmakSPAbrJ933mGgm1uYxmOElyQYZVW7D7CRUd8mKek+QlViin63e71vyfMVOGXtWwSb87dxghggQ=="
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/@mempool/bitcoin/-/bitcoin-3.0.3.tgz",
"integrity": "sha512-10UdbwchnevlebDTN+Xhv75AEhDmTMy9UgWHlqx5MG2mheFG6+eqmtHsdxeYnv3IAtTtlRfA6fY0RbV/x4TNFQ=="
},
"@mempool/electrum-client": {
"version": "1.1.8",
@@ -1665,8 +1497,7 @@
"@types/node": {
"version": "14.14.20",
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.20.tgz",
"integrity": "sha512-Y93R97Ouif9JEOWPIUyU+eyIdyRqQR0I8Ez1dzku4hDx34NWh4HbtIc3WNzwB1Y9ULvNGeu5B8h8bVL5cAk4/A==",
"dev": true
"integrity": "sha512-Y93R97Ouif9JEOWPIUyU+eyIdyRqQR0I8Ez1dzku4hDx34NWh4HbtIc3WNzwB1Y9ULvNGeu5B8h8bVL5cAk4/A=="
},
"@types/qs": {
"version": "6.9.5",
@@ -1691,10 +1522,9 @@
}
},
"@types/ws": {
"version": "7.4.4",
"resolved": "https://registry.npmjs.org/@types/ws/-/ws-7.4.4.tgz",
"integrity": "sha512-d/7W23JAXPodQNbOZNXvl2K+bqAQrCMwlh/nuQsPSQk6Fq0opHoPrUw43aHsvSbIiQPr8Of2hkFbnz1XBFVyZQ==",
"dev": true,
"version": "8.2.2",
"resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.2.2.tgz",
"integrity": "sha512-NOn5eIcgWLOo6qW8AcuLZ7G8PycXu0xTxxkS6Q18VWFxgPUSOwV0pBj2a/4viNZVu25i7RIB7GttdkAIUUXOOg==",
"requires": {
"@types/node": "*"
}
@@ -1732,11 +1562,11 @@
"integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI="
},
"axios": {
"version": "0.21.1",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz",
"integrity": "sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==",
"version": "0.24.0",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.24.0.tgz",
"integrity": "sha512-Q6cWsys88HoPgAaFAVUb0WpPk0O8iTeisR9IMqy9G8AbO4NlpVknrnQS03zzF9PGAWgO3cgletO3VjV/P7VztA==",
"requires": {
"follow-redirects": "^1.10.0"
"follow-redirects": "^1.14.4"
}
},
"balanced-match": {
@@ -1746,92 +1576,37 @@
"dev": true
},
"base-x": {
"version": "3.0.8",
"resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.8.tgz",
"integrity": "sha512-Rl/1AWP4J/zRrk54hhlxH4drNxPJXYUaKffODVI53/dAsV4t9fBxyxYKAVPU1XBHxYwOWP9h9H0hM2MVw4YfJA==",
"version": "3.0.9",
"resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.9.tgz",
"integrity": "sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ==",
"requires": {
"safe-buffer": "^5.0.1"
}
},
"bech32": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz",
"integrity": "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ=="
},
"bindings": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz",
"integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==",
"requires": {
"file-uri-to-path": "1.0.0"
}
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/bech32/-/bech32-2.0.0.tgz",
"integrity": "sha512-LcknSilhIGatDAsY1ak2I8VtGaHNhgMSYVxFrGLXv+xLHytaKZKcaUJJUE7qmBr7h33o5YQwP55pMI0xmkpJwg=="
},
"bip174": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/bip174/-/bip174-2.0.1.tgz",
"integrity": "sha512-i3X26uKJOkDTAalYAp0Er+qGMDhrbbh2o93/xiPyAN2s25KrClSpe3VXo/7mNJoqA5qfko8rLS2l3RWZgYmjKQ=="
},
"bip32": {
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/bip32/-/bip32-2.0.6.tgz",
"integrity": "sha512-HpV5OMLLGTjSVblmrtYRfFFKuQB+GArM0+XP8HGWfJ5vxYBqo+DesvJwOdC2WJ3bCkZShGf0QIfoIpeomVzVdA==",
"requires": {
"@types/node": "10.12.18",
"bs58check": "^2.1.1",
"create-hash": "^1.2.0",
"create-hmac": "^1.1.7",
"tiny-secp256k1": "^1.1.3",
"typeforce": "^1.11.5",
"wif": "^2.0.6"
},
"dependencies": {
"@types/node": {
"version": "10.12.18",
"resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.18.tgz",
"integrity": "sha512-fh+pAqt4xRzPfqA6eh3Z2y6fyZavRIumvjhaCL753+TVkGKGhpPeyrJG2JftD0T9q4GF00KjefsQ+PQNDdWQaQ=="
}
}
},
"bip66": {
"version": "1.1.5",
"resolved": "https://registry.npmjs.org/bip66/-/bip66-1.1.5.tgz",
"integrity": "sha1-AfqHSHhcpwlV1QESF9GzE5lpyiI=",
"requires": {
"safe-buffer": "^5.0.1"
}
},
"bitcoin-ops": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/bitcoin-ops/-/bitcoin-ops-1.4.1.tgz",
"integrity": "sha512-pef6gxZFztEhaE9RY9HmWVmiIHqCb2OyS4HPKkpc6CIiiOa3Qmuoylxc5P2EkU3w+5eTSifI9SEZC88idAIGow=="
},
"bitcoinjs-lib": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/bitcoinjs-lib/-/bitcoinjs-lib-5.2.0.tgz",
"integrity": "sha512-5DcLxGUDejgNBYcieMIUfjORtUeNWl828VWLHJGVKZCb4zIS1oOySTUr0LGmcqJBQgTBz3bGbRQla4FgrdQEIQ==",
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/bitcoinjs-lib/-/bitcoinjs-lib-6.0.1.tgz",
"integrity": "sha512-x/7D4jDj/MMkmO6t3p2CSDXTqpwZ/jRsRiJDmaiXabrR9XRo7jwby8HRn7EyK1h24rKFFI7vI0ay4czl6bDOZQ==",
"requires": {
"bech32": "^1.1.2",
"bech32": "^2.0.0",
"bip174": "^2.0.1",
"bip32": "^2.0.4",
"bip66": "^1.1.0",
"bitcoin-ops": "^1.4.0",
"bs58check": "^2.0.0",
"bs58check": "^2.1.2",
"create-hash": "^1.1.0",
"create-hmac": "^1.1.3",
"merkle-lib": "^2.0.10",
"pushdata-bitcoin": "^1.0.1",
"randombytes": "^2.0.1",
"tiny-secp256k1": "^1.1.1",
"typeforce": "^1.11.3",
"varuint-bitcoin": "^1.0.4",
"varuint-bitcoin": "^1.1.2",
"wif": "^2.0.1"
}
},
"bn.js": {
"version": "4.11.9",
"resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz",
"integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw=="
},
"body-parser": {
"version": "1.19.0",
"resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz",
@@ -1859,11 +1634,6 @@
"concat-map": "0.0.1"
}
},
"brorand": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz",
"integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8="
},
"bs58": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz",
@@ -1982,19 +1752,6 @@
"sha.js": "^2.4.0"
}
},
"create-hmac": {
"version": "1.1.7",
"resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz",
"integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==",
"requires": {
"cipher-base": "^1.0.3",
"create-hash": "^1.1.0",
"inherits": "^2.0.1",
"ripemd160": "^2.0.0",
"safe-buffer": "^5.0.1",
"sha.js": "^2.4.8"
}
},
"crypto-js": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.0.0.tgz",
@@ -2009,9 +1766,9 @@
}
},
"denque": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/denque/-/denque-1.5.0.tgz",
"integrity": "sha512-CYiCSgIF1p6EUByQPlGkKnP1M9g0ZV3qMIrqMqZqdwazygIA/YP2vrbcyl1h/WppKJTdl1F85cXIle+394iDAQ=="
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/denque/-/denque-2.0.1.tgz",
"integrity": "sha512-tfiWc6BQLXNLpNiR5iGd0Ocu3P3VpxfzFiqubLgMfhfOw9WyvgJBd46CClNn9k3qfbjvT//0cf7AlYRX/OslMQ=="
},
"depd": {
"version": "1.1.2",
@@ -2034,20 +1791,6 @@
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
"integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0="
},
"elliptic": {
"version": "6.5.4",
"resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz",
"integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==",
"requires": {
"bn.js": "^4.11.9",
"brorand": "^1.1.0",
"hash.js": "^1.0.0",
"hmac-drbg": "^1.0.1",
"inherits": "^2.0.4",
"minimalistic-assert": "^1.0.1",
"minimalistic-crypto-utils": "^1.0.1"
}
},
"encodeurl": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
@@ -2119,11 +1862,6 @@
}
}
},
"file-uri-to-path": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
"integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw=="
},
"finalhandler": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz",
@@ -2139,9 +1877,9 @@
}
},
"follow-redirects": {
"version": "1.13.1",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.1.tgz",
"integrity": "sha512-SSG5xmZh1mkPGyKzjZP8zLjltIfpW32Y5QpdNJyjcfGxK3qo3NDDkZOZSFiGn1A6SclQxY9GzEwAHQ3dmYRWpg=="
"version": "1.14.6",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.6.tgz",
"integrity": "sha512-fhUl5EwSJbbl8AR+uYL2KQDxLkdSjZGR36xy46AO7cOMTrCMON6Sa28FmAnC2tRTDbd/Uuzz3aJBv7EBN7JH8A=="
},
"forwarded": {
"version": "0.1.2",
@@ -2212,25 +1950,6 @@
"safe-buffer": "^5.2.0"
}
},
"hash.js": {
"version": "1.1.7",
"resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz",
"integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==",
"requires": {
"inherits": "^2.0.3",
"minimalistic-assert": "^1.0.1"
}
},
"hmac-drbg": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz",
"integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=",
"requires": {
"hash.js": "^1.0.3",
"minimalistic-assert": "^1.0.0",
"minimalistic-crypto-utils": "^1.0.1"
}
},
"http-errors": {
"version": "1.7.2",
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz",
@@ -2346,11 +2065,6 @@
"resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz",
"integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E="
},
"merkle-lib": {
"version": "2.0.10",
"resolved": "https://registry.npmjs.org/merkle-lib/-/merkle-lib-2.0.10.tgz",
"integrity": "sha1-grjbrnXieneFOItz+ddyXQ9vMyY="
},
"methods": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",
@@ -2374,16 +2088,6 @@
"mime-db": "1.45.0"
}
},
"minimalistic-assert": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz",
"integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A=="
},
"minimalistic-crypto-utils": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz",
"integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo="
},
"minimatch": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
@@ -2414,13 +2118,13 @@
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
},
"mysql2": {
"version": "2.2.5",
"resolved": "https://registry.npmjs.org/mysql2/-/mysql2-2.2.5.tgz",
"integrity": "sha512-XRqPNxcZTpmFdXbJqb+/CtYVLCx14x1RTeNMD4954L331APu75IC74GDqnZMEt1kwaXy6TySo55rF2F3YJS78g==",
"version": "2.3.3",
"resolved": "https://registry.npmjs.org/mysql2/-/mysql2-2.3.3.tgz",
"integrity": "sha512-wxJUev6LgMSgACDkb/InIFxDprRa6T95+VEoR+xPvtngtccNH2dGjEB/fVZ8yg1gWv1510c9CvXuJHi5zUm0ZA==",
"requires": {
"denque": "^1.4.1",
"denque": "^2.0.1",
"generate-function": "^2.3.1",
"iconv-lite": "^0.6.2",
"iconv-lite": "^0.6.3",
"long": "^4.0.0",
"lru-cache": "^6.0.0",
"named-placeholders": "^1.1.2",
@@ -2429,9 +2133,9 @@
},
"dependencies": {
"iconv-lite": {
"version": "0.6.2",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.2.tgz",
"integrity": "sha512-2y91h5OpQlolefMPmUlivelittSWy0rP+oYVpn6A7GwVHNE8AWzoYOBNmlwks3LobaJxgHCYZAnyNo2GgpNRNQ==",
"version": "0.6.3",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
"integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==",
"requires": {
"safer-buffer": ">= 2.1.2 < 3.0.0"
}
@@ -2462,11 +2166,6 @@
}
}
},
"nan": {
"version": "2.14.2",
"resolved": "https://registry.npmjs.org/nan/-/nan-2.14.2.tgz",
"integrity": "sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ=="
},
"negotiator": {
"version": "0.6.2",
"resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz",
@@ -2506,9 +2205,9 @@
"dev": true
},
"path-parse": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz",
"integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==",
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
"integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",
"dev": true
},
"path-to-regexp": {
@@ -2530,27 +2229,11 @@
"resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz",
"integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM="
},
"pushdata-bitcoin": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/pushdata-bitcoin/-/pushdata-bitcoin-1.0.1.tgz",
"integrity": "sha1-FZMdPNlnreUiBvUjqnMxrvfUOvc=",
"requires": {
"bitcoin-ops": "^1.3.0"
}
},
"qs": {
"version": "6.7.0",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz",
"integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ=="
},
"randombytes": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz",
"integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==",
"requires": {
"safe-buffer": "^5.1.0"
}
},
"range-parser": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
@@ -2702,18 +2385,6 @@
"has-flag": "^3.0.0"
}
},
"tiny-secp256k1": {
"version": "1.1.6",
"resolved": "https://registry.npmjs.org/tiny-secp256k1/-/tiny-secp256k1-1.1.6.tgz",
"integrity": "sha512-FmqJZGduTyvsr2cF3375fqGHUovSwDi/QytexX1Se4BPuPZpTE5Ftp5fg+EFSuEf3lhZqgCRjEG3ydUQ/aNiwA==",
"requires": {
"bindings": "^1.3.0",
"bn.js": "^4.11.8",
"create-hmac": "^1.1.7",
"elliptic": "^6.4.0",
"nan": "^2.13.2"
}
},
"toidentifier": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz",
@@ -2770,10 +2441,9 @@
"integrity": "sha512-7uc1O8h1M1g0rArakJdf0uLRSSgFcYexrVoKo+bzJd32gd4gDy2L/Z+8/FjPnU9ydY3pEnVPtr9FyscYY60K1g=="
},
"typescript": {
"version": "4.2.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.2.3.tgz",
"integrity": "sha512-qOcYwxaByStAWrBf4x0fibwZvMRG+r4cQoTjbPtUlrWjBHbmCAww1i448U0GJ+3cNNEtebDteo/cHOR3xJ4wEw==",
"dev": true
"version": "4.4.4",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.4.4.tgz",
"integrity": "sha512-DqGhF5IKoBl8WNf8C1gu8q0xZSInh9j1kJJMqT3a94w1JzVaBU4EXOSMrz9yDqMT0xt3selp83fuFMQ0uzv6qA=="
},
"unpipe": {
"version": "1.0.0",
@@ -2818,9 +2488,9 @@
"dev": true
},
"ws": {
"version": "7.4.6",
"resolved": "https://registry.npmjs.org/ws/-/ws-7.4.6.tgz",
"integrity": "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==",
"version": "8.3.0",
"resolved": "https://registry.npmjs.org/ws/-/ws-8.3.0.tgz",
"integrity": "sha512-Gs5EZtpqZzLvmIM59w4igITU57lrtYVFneaa434VROv4thzJyV6UjIL3D42lslWlI+D4KzLYnxSwtfuiO79sNw==",
"requires": {}
},
"yallist": {

View File

@@ -1,6 +1,6 @@
{
"name": "mempool-backend",
"version": "2.2.0",
"version": "2.3.0-dev",
"description": "Bitcoin mempool visualizer and blockchain explorer backend",
"license": "GNU Affero General Public License v3.0",
"homepage": "https://mempool.space",
@@ -28,23 +28,23 @@
"test": "echo \"Error: no test specified\" && exit 1"
},
"dependencies": {
"@mempool/bitcoin": "^3.0.2",
"@mempool/bitcoin": "^3.0.3",
"@mempool/electrum-client": "^1.1.7",
"axios": "^0.21.1",
"bitcoinjs-lib": "^5.2.0",
"@types/ws": "8.2.2",
"axios": "0.24.0",
"bitcoinjs-lib": "6.0.1",
"crypto-js": "^4.0.0",
"express": "^4.17.1",
"locutus": "^2.0.12",
"mysql2": "2.2.5",
"mysql2": "2.3.3",
"node-worker-threads-pool": "^1.4.3",
"ws": "^7.4.6"
"typescript": "4.4.4",
"ws": "8.3.0"
},
"devDependencies": {
"@types/compression": "^1.0.1",
"@types/express": "^4.17.2",
"@types/locutus": "^0.0.6",
"@types/ws": "^7.4.4",
"tslint": "^6.1.0",
"typescript": "^4.1.5"
"tslint": "^6.1.0"
}
}

View File

@@ -30,7 +30,7 @@ class BackendInfo {
try {
this.gitCommitHash = fs.readFileSync('../.git/refs/heads/master').toString().trim();
} catch (e) {
logger.err('Could not load git commit info: ' + e.message || e);
logger.err('Could not load git commit info: ' + (e instanceof Error ? e.message : e));
}
}
@@ -39,7 +39,7 @@ class BackendInfo {
const packageJson = fs.readFileSync('package.json').toString();
this.version = JSON.parse(packageJson).version;
} catch (e) {
throw new Error(e);
throw new Error(e instanceof Error ? e.message : 'Error');
}
}
}

View File

@@ -162,7 +162,7 @@ class Bisq {
this.buildIndex();
this.calculateStats();
} catch (e) {
logger.err('loadBisqDumpFile() error.' + e.message || e);
logger.info('loadBisqDumpFile() error.' + (e instanceof Error ? e.message : e));
}
}

View File

@@ -71,7 +71,7 @@ interface BisqScriptPubKey {
addresses: string[];
asm: string;
hex: string;
reqSigs: number;
reqSigs?: number;
type: string;
}

View File

@@ -102,7 +102,7 @@ class Bisq {
logger.debug('Bisq market data updated in ' + time + ' ms');
}
} catch (e) {
logger.err('loadBisqMarketDataDumpFile() error.' + e.message || e);
logger.err('loadBisqMarketDataDumpFile() error.' + (e instanceof Error ? e.message : e));
}
}

View File

@@ -6,8 +6,17 @@ export interface AbstractBitcoinApi {
$getBlockHeightTip(): Promise<number>;
$getTxIdsForBlock(hash: string): Promise<string[]>;
$getBlockHash(height: number): Promise<string>;
$getBlockHeader(hash: string): Promise<string>;
$getBlock(hash: string): Promise<IEsploraApi.Block>;
$getAddress(address: string): Promise<IEsploraApi.Address>;
$getAddressTransactions(address: string, lastSeenTxId: string): Promise<IEsploraApi.Transaction[]>;
$getAddressPrefix(prefix: string): string[];
$sendRawTransaction(rawTransaction: string): Promise<string>;
}
export interface BitcoinRpcCredentials {
host: string;
port: number;
user: string;
pass: string;
timeout: number;
}

View File

@@ -3,16 +3,17 @@ import { AbstractBitcoinApi } from './bitcoin-api-abstract-factory';
import EsploraApi from './esplora-api';
import BitcoinApi from './bitcoin-api';
import ElectrumApi from './electrum-api';
import bitcoinClient from './bitcoin-client';
function bitcoinApiFactory(): AbstractBitcoinApi {
switch (config.MEMPOOL.BACKEND) {
case 'esplora':
return new EsploraApi();
case 'electrum':
return new ElectrumApi();
return new ElectrumApi(bitcoinClient);
case 'none':
default:
return new BitcoinApi();
return new BitcoinApi(bitcoinClient);
}
}

View File

@@ -72,7 +72,7 @@ export namespace IBitcoinApi {
time: number; // (numeric) Same as blocktime
}
interface Vin {
export interface Vin {
txid?: string; // (string) The transaction id
vout?: number; // (string)
scriptSig?: { // (json object) The script
@@ -82,28 +82,36 @@ export namespace IBitcoinApi {
sequence: number; // (numeric) The script sequence number
txinwitness?: string[]; // (string) hex-encoded witness data
coinbase?: string;
is_pegin?: boolean; // (boolean) Elements peg-in
}
interface Vout {
export interface Vout {
value: number; // (numeric) The value in BTC
n: number; // (numeric) index
asset?: string; // (string) Elements asset id
scriptPubKey: { // (json object)
asm: string; // (string) the asm
hex: string; // (string) the hex
reqSigs: number; // (numeric) The required sigs
reqSigs?: number; // (numeric) The required sigs
type: string; // (string) The type, eg 'pubkeyhash'
addresses: string[] // (string) bitcoin address
address?: string; // (string) bitcoin address
addresses?: string[]; // (string) bitcoin addresses
pegout_chain?: string; // (string) Elements peg-out chain
pegout_addresses?: string[]; // (string) Elements peg-out addresses
};
}
export interface AddressInformation {
isvalid: boolean; // (boolean) If the address is valid or not. If not, this is the only property returned.
isvalid_parent?: boolean; // (boolean) Elements only
address: string; // (string) The bitcoin address validated
scriptPubKey: string; // (string) The hex-encoded scriptPubKey generated by the address
isscript: boolean; // (boolean) If the key is a script
iswitness: boolean; // (boolean) If the address is a witness
witness_version?: boolean; // (numeric, optional) The version number of the witness program
witness_program: string; // (string, optional) The hex value of the witness program
confidential_key?: string; // (string) Elements only
unconfidential?: string; // (string) Elements only
}
export interface ChainTips {
@@ -113,4 +121,46 @@ export namespace IBitcoinApi {
status: 'invalid' | 'headers-only' | 'valid-headers' | 'valid-fork' | 'active';
}
export interface BlockchainInfo {
chain: number; // (string) current network name as defined in BIP70 (main, test, regtest)
blocks: number; // (numeric) the current number of blocks processed in the server
headers: number; // (numeric) the current number of headers we have validated
bestblockhash: string, // (string) the hash of the currently best block
difficulty: number; // (numeric) the current difficulty
mediantime: number; // (numeric) median time for the current best block
verificationprogress: number; // (numeric) estimate of verification progress [0..1]
initialblockdownload: boolean; // (bool) (debug information) estimate of whether this node is in Initial Block Download mode.
chainwork: string // (string) total amount of work in active chain, in hexadecimal
size_on_disk: number; // (numeric) the estimated size of the block and undo files on disk
pruned: number; // (boolean) if the blocks are subject to pruning
pruneheight: number; // (numeric) lowest-height complete block stored (only present if pruning is enabled)
automatic_pruning: number; // (boolean) whether automatic pruning is enabled (only present if pruning is enabled)
prune_target_size: number; // (numeric) the target size used by pruning (only present if automatic pruning is enabled)
softforks: SoftFork[]; // (array) status of softforks in progress
bip9_softforks: { [name: string]: Bip9SoftForks[] } // (object) status of BIP9 softforks in progress
warnings: string; // (string) any network and blockchain warnings.
}
interface SoftFork {
id: string; // (string) name of softfork
version: number; // (numeric) block version
reject: { // (object) progress toward rejecting pre-softfork blocks
status: boolean; // (boolean) true if threshold reached
},
}
interface Bip9SoftForks {
status: number; // (string) one of defined, started, locked_in, active, failed
bit: number; // (numeric) the bit (0-28) in the block version field used to signal this softfork (only for started status)
startTime: number; // (numeric) the minimum median time past of a block at which the bit gains its meaning
timeout: number; // (numeric) the median time past of a block at which the deployment is considered failed if not yet locked in
since: number; // (numeric) height of the first block to which the status applies
statistics: { // (object) numeric statistics about BIP9 signalling for a softfork (only for started status)
period: number; // (numeric) the length in blocks of the BIP9 signalling period
threshold: number; // (numeric) the number of blocks with the version bit set required to activate the feature
elapsed: number; // (numeric) the number of blocks elapsed since the beginning of the current period
count: number; // (numeric) the number of blocks with the version bit set in the current period
possible: boolean; // (boolean) returns false if there are not enough blocks left in this period to pass activation threshold
}
}
}

View File

@@ -1,5 +1,3 @@
import config from '../../config';
import * as bitcoin from '@mempool/bitcoin';
import * as bitcoinjs from 'bitcoinjs-lib';
import { AbstractBitcoinApi } from './bitcoin-api-abstract-factory';
import { IBitcoinApi } from './bitcoin-api.interface';
@@ -10,16 +8,10 @@ import { TransactionExtended } from '../../mempool.interfaces';
class BitcoinApi implements AbstractBitcoinApi {
private rawMempoolCache: IBitcoinApi.RawMempool | null = null;
private bitcoindClient: any;
protected bitcoindClient: any;
constructor() {
this.bitcoindClient = new bitcoin.Client({
host: config.CORE_RPC.HOST,
port: config.CORE_RPC.PORT,
user: config.CORE_RPC.USERNAME,
pass: config.CORE_RPC.PASSWORD,
timeout: 60000,
});
constructor(bitcoinClient: any) {
this.bitcoindClient = bitcoinClient;
}
$getRawTransaction(txId: string, skipConversion = false, addPrevout = false): Promise<IEsploraApi.Transaction> {
@@ -56,10 +48,18 @@ class BitcoinApi implements AbstractBitcoinApi {
.then((rpcBlock: IBitcoinApi.Block) => rpcBlock.tx);
}
$getRawBlock(hash: string): Promise<string> {
return this.bitcoindClient.getBlock(hash, 0);
}
$getBlockHash(height: number): Promise<string> {
return this.bitcoindClient.getBlockHash(height);
}
$getBlockHeader(hash: string): Promise<string> {
return this.bitcoindClient.getBlockHeader(hash, false);
}
async $getBlock(hash: string): Promise<IEsploraApi.Block> {
const foundBlock = blocks.getBlocks().find((block) => block.id === hash);
if (foundBlock) {
@@ -98,6 +98,10 @@ class BitcoinApi implements AbstractBitcoinApi {
return found;
}
$sendRawTransaction(rawTransaction: string): Promise<string> {
return this.bitcoindClient.sendRawTransaction(rawTransaction);
}
protected async $convertTransaction(transaction: IBitcoinApi.Transaction, addPrevout: boolean): Promise<IEsploraApi.Transaction> {
let esploraTransaction: IEsploraApi.Transaction = {
txid: transaction.txid,
@@ -115,7 +119,8 @@ class BitcoinApi implements AbstractBitcoinApi {
return {
value: vout.value * 100000000,
scriptpubkey: vout.scriptPubKey.hex,
scriptpubkey_address: vout.scriptPubKey && vout.scriptPubKey.addresses ? vout.scriptPubKey.addresses[0] : '',
scriptpubkey_address: vout.scriptPubKey && vout.scriptPubKey.address ? vout.scriptPubKey.address
: vout.scriptPubKey.addresses ? vout.scriptPubKey.addresses[0] : '',
scriptpubkey_asm: vout.scriptPubKey.asm ? this.convertScriptSigAsm(vout.scriptPubKey.asm) : '',
scriptpubkey_type: this.translateScriptPubKeyType(vout.scriptPubKey.type),
};
@@ -229,10 +234,6 @@ class BitcoinApi implements AbstractBitcoinApi {
});
}
protected $validateAddress(address: string): Promise<IBitcoinApi.AddressInformation> {
return this.bitcoindClient.validateAddress(address);
}
private $getMempoolEntry(txid: string): Promise<IBitcoinApi.MempoolEntry> {
return this.bitcoindClient.getMempoolEntry(txid);
}
@@ -298,6 +299,11 @@ class BitcoinApi implements AbstractBitcoinApi {
const witnessScript = vin.witness[vin.witness.length - 1];
vin.inner_witnessscript_asm = this.convertScriptSigAsm(bitcoinjs.script.toASM(Buffer.from(witnessScript, 'hex')));
}
if (vin.prevout.scriptpubkey_type === 'v1_p2tr' && vin.witness && vin.witness.length > 1) {
const witnessScript = vin.witness[vin.witness.length - 2];
vin.inner_witnessscript_asm = this.convertScriptSigAsm(bitcoinjs.script.toASM(Buffer.from(witnessScript, 'hex')));
}
}
}

View File

@@ -1,45 +0,0 @@
import config from '../../config';
import * as bitcoin from '@mempool/bitcoin';
import { IBitcoinApi } from './bitcoin-api.interface';
class BitcoinBaseApi {
bitcoindClient: any;
bitcoindClientMempoolInfo: any;
constructor() {
this.bitcoindClient = new bitcoin.Client({
host: config.CORE_RPC.HOST,
port: config.CORE_RPC.PORT,
user: config.CORE_RPC.USERNAME,
pass: config.CORE_RPC.PASSWORD,
timeout: 60000,
});
if (config.CORE_RPC_MINFEE.ENABLED) {
this.bitcoindClientMempoolInfo = new bitcoin.Client({
host: config.CORE_RPC_MINFEE.HOST,
port: config.CORE_RPC_MINFEE.PORT,
user: config.CORE_RPC_MINFEE.USERNAME,
pass: config.CORE_RPC_MINFEE.PASSWORD,
timeout: 60000,
});
}
}
$getMempoolInfo(): Promise<IBitcoinApi.MempoolInfo> {
if (config.CORE_RPC_MINFEE.ENABLED) {
return Promise.all([
this.bitcoindClient.getMempoolInfo(),
this.bitcoindClientMempoolInfo.getMempoolInfo()
]).then(([mempoolInfo, secondMempoolInfo]) => {
mempoolInfo.maxmempool = secondMempoolInfo.maxmempool;
mempoolInfo.mempoolminfee = secondMempoolInfo.mempoolminfee;
mempoolInfo.minrelaytxfee = secondMempoolInfo.minrelaytxfee;
return mempoolInfo;
});
}
return this.bitcoindClient.getMempoolInfo();
}
}
export default new BitcoinBaseApi();

View File

@@ -0,0 +1,13 @@
import config from '../../config';
import * as bitcoin from '@mempool/bitcoin';
import { BitcoinRpcCredentials } from './bitcoin-api-abstract-factory';
const nodeRpcCredentials: BitcoinRpcCredentials = {
host: config.CORE_RPC.HOST,
port: config.CORE_RPC.PORT,
user: config.CORE_RPC.USERNAME,
pass: config.CORE_RPC.PASSWORD,
timeout: 60000,
};
export default new bitcoin.Client(nodeRpcCredentials);

View File

@@ -0,0 +1,13 @@
import config from '../../config';
import * as bitcoin from '@mempool/bitcoin';
import { BitcoinRpcCredentials } from './bitcoin-api-abstract-factory';
const nodeRpcCredentials: BitcoinRpcCredentials = {
host: config.SECOND_CORE_RPC.HOST,
port: config.SECOND_CORE_RPC.PORT,
user: config.SECOND_CORE_RPC.USERNAME,
pass: config.SECOND_CORE_RPC.PASSWORD,
timeout: 60000,
};
export default new bitcoin.Client(nodeRpcCredentials);

View File

@@ -1,10 +1,8 @@
import config from '../../config';
import { AbstractBitcoinApi } from './bitcoin-api-abstract-factory';
import { IBitcoinApi } from './bitcoin-api.interface';
import { IEsploraApi } from './esplora-api.interface';
import { IElectrumApi } from './electrum-api.interface';
import BitcoinApi from './bitcoin-api';
import mempool from '../mempool';
import logger from '../../logger';
import * as ElectrumClient from '@mempool/electrum-client';
import * as sha256 from 'crypto-js/sha256';
@@ -15,8 +13,8 @@ import memoryCache from '../memory-cache';
class BitcoindElectrsApi extends BitcoinApi implements AbstractBitcoinApi {
private electrumClient: any;
constructor() {
super();
constructor(bitcoinClient: any) {
super(bitcoinClient);
const electrumConfig = { client: 'mempool-v2', version: '1.4' };
const electrumPersistencePolicy = { retryPeriod: 10000, maxRetry: 1000, callback: null };
@@ -44,7 +42,7 @@ class BitcoindElectrsApi extends BitcoinApi implements AbstractBitcoinApi {
}
async $getAddress(address: string): Promise<IEsploraApi.Address> {
const addressInfo = await this.$validateAddress(address);
const addressInfo = await this.bitcoindClient.validateAddress(address);
if (!addressInfo || !addressInfo.isvalid) {
return ({
'address': address,
@@ -89,16 +87,13 @@ class BitcoindElectrsApi extends BitcoinApi implements AbstractBitcoinApi {
},
'electrum': true,
};
} catch (e) {
if (e === 'failed to get confirmed status') {
e = 'The number of transactions on this address exceeds the Electrum server limit';
}
throw new Error(e);
} catch (e: any) {
throw new Error(typeof e === 'string' ? e : e && e.message || e);
}
}
async $getAddressTransactions(address: string, lastSeenTxId: string): Promise<IEsploraApi.Transaction[]> {
const addressInfo = await this.$validateAddress(address);
const addressInfo = await this.bitcoindClient.validateAddress(address);
if (!addressInfo || !addressInfo.isvalid) {
return [];
}
@@ -126,12 +121,9 @@ class BitcoindElectrsApi extends BitcoinApi implements AbstractBitcoinApi {
}
return transactions;
} catch (e) {
} catch (e: any) {
loadingIndicators.setProgress('address-' + address, 100);
if (e === 'failed to get confirmed status') {
e = 'The number of transactions on this address exceeds the Electrum server limit';
}
throw new Error(e);
throw new Error(typeof e === 'string' ? e : e && e.message || e);
}
}

View File

@@ -9,6 +9,7 @@ export namespace IEsploraApi {
vin: Vin[];
vout: Vout[];
status: Status;
hex?: string;
}
export interface Recent {

View File

@@ -35,6 +35,11 @@ class ElectrsApi implements AbstractBitcoinApi {
.then((response) => response.data);
}
$getBlockHeader(hash: string): Promise<string> {
return axios.get<string>(config.ESPLORA.REST_API_URL + '/block/' + hash + '/header', this.axiosConfig)
.then((response) => response.data);
}
$getBlock(hash: string): Promise<IEsploraApi.Block> {
return axios.get<IEsploraApi.Block>(config.ESPLORA.REST_API_URL + '/block/' + hash, this.axiosConfig)
.then((response) => response.data);
@@ -51,6 +56,10 @@ class ElectrsApi implements AbstractBitcoinApi {
$getAddressPrefix(prefix: string): string[] {
throw new Error('Method not implemented.');
}
$sendRawTransaction(rawTransaction: string): Promise<string> {
throw new Error('Method not implemented.');
}
}
export default ElectrsApi;

View File

@@ -6,12 +6,14 @@ import { BlockExtended, TransactionExtended } from '../mempool.interfaces';
import { Common } from './common';
import diskCache from './disk-cache';
import transactionUtils from './transaction-utils';
import bitcoinClient from './bitcoin/bitcoin-client';
class Blocks {
private static INITIAL_BLOCK_AMOUNT = 8;
private blocks: BlockExtended[] = [];
private currentBlockHeight = 0;
private currentDifficulty = 0;
private lastDifficultyAdjustmentTime = 0;
private previousDifficultyRetarget = 0;
private newBlockCallbacks: ((block: BlockExtended, txIds: string[], transactions: TransactionExtended[]) => void)[] = [];
constructor() { }
@@ -32,21 +34,32 @@ class Blocks {
const blockHeightTip = await bitcoinApi.$getBlockHeightTip();
if (this.blocks.length === 0) {
this.currentBlockHeight = blockHeightTip - Blocks.INITIAL_BLOCK_AMOUNT;
this.currentBlockHeight = blockHeightTip - config.MEMPOOL.INITIAL_BLOCKS_AMOUNT;
} else {
this.currentBlockHeight = this.blocks[this.blocks.length - 1].height;
}
if (blockHeightTip - this.currentBlockHeight > Blocks.INITIAL_BLOCK_AMOUNT * 2) {
logger.info(`${blockHeightTip - this.currentBlockHeight} blocks since tip. Fast forwarding to the ${Blocks.INITIAL_BLOCK_AMOUNT} recent blocks`);
this.currentBlockHeight = blockHeightTip - Blocks.INITIAL_BLOCK_AMOUNT;
if (blockHeightTip - this.currentBlockHeight > config.MEMPOOL.INITIAL_BLOCKS_AMOUNT * 2) {
logger.info(`${blockHeightTip - this.currentBlockHeight} blocks since tip. Fast forwarding to the ${config.MEMPOOL.INITIAL_BLOCKS_AMOUNT} recent blocks`);
this.currentBlockHeight = blockHeightTip - config.MEMPOOL.INITIAL_BLOCKS_AMOUNT;
}
if (!this.lastDifficultyAdjustmentTime) {
const heightDiff = blockHeightTip % 2016;
const blockHash = await bitcoinApi.$getBlockHash(blockHeightTip - heightDiff);
const block = await bitcoinApi.$getBlock(blockHash);
this.lastDifficultyAdjustmentTime = block.timestamp;
const blockchainInfo = await bitcoinClient.getBlockchainInfo();
if (blockchainInfo.blocks === blockchainInfo.headers) {
const heightDiff = blockHeightTip % 2016;
const blockHash = await bitcoinApi.$getBlockHash(blockHeightTip - heightDiff);
const block = await bitcoinApi.$getBlock(blockHash);
this.lastDifficultyAdjustmentTime = block.timestamp;
this.currentDifficulty = block.difficulty;
const previousPeriodBlockHash = await bitcoinApi.$getBlockHash(blockHeightTip - heightDiff - 2016);
const previousPeriodBlock = await bitcoinApi.$getBlock(previousPeriodBlockHash);
this.previousDifficultyRetarget = (block.difficulty - previousPeriodBlock.difficulty) / previousPeriodBlock.difficulty * 100;
logger.debug(`Initial difficulty adjustment data set.`);
} else {
logger.debug(`Blockchain headers (${blockchainInfo.headers}) and blocks (${blockchainInfo.blocks}) not in sync. Waiting...`);
}
}
while (this.currentBlockHeight < blockHeightTip) {
@@ -76,7 +89,7 @@ class Blocks {
const tx = await transactionUtils.$getTransactionExtended(txIds[i]);
transactions.push(tx);
} catch (e) {
logger.debug('Error fetching block tx: ' + e.message || e);
logger.debug('Error fetching block tx: ' + (e instanceof Error ? e.message : e));
if (i === 0) {
throw new Error('Failed to fetch Coinbase transaction: ' + txIds[i]);
}
@@ -97,16 +110,18 @@ class Blocks {
blockExtended.coinbaseTx = transactionUtils.stripCoinbaseTransaction(transactions[0]);
transactions.shift();
transactions.sort((a, b) => b.effectiveFeePerVsize - a.effectiveFeePerVsize);
blockExtended.medianFee = transactions.length > 1 ? Common.median(transactions.map((tx) => tx.effectiveFeePerVsize)) : 0;
blockExtended.feeRange = transactions.length > 1 ? Common.getFeesInRange(transactions, 8) : [0, 0];
blockExtended.medianFee = transactions.length > 0 ? Common.median(transactions.map((tx) => tx.effectiveFeePerVsize)) : 0;
blockExtended.feeRange = transactions.length > 0 ? Common.getFeesInRange(transactions, 8) : [0, 0];
if (block.height % 2016 === 0) {
this.previousDifficultyRetarget = (block.difficulty - this.currentDifficulty) / this.currentDifficulty * 100;
this.lastDifficultyAdjustmentTime = block.timestamp;
this.currentDifficulty = block.difficulty;
}
this.blocks.push(blockExtended);
if (this.blocks.length > Blocks.INITIAL_BLOCK_AMOUNT * 4) {
this.blocks = this.blocks.slice(-Blocks.INITIAL_BLOCK_AMOUNT * 4);
if (this.blocks.length > config.MEMPOOL.INITIAL_BLOCKS_AMOUNT * 4) {
this.blocks = this.blocks.slice(-config.MEMPOOL.INITIAL_BLOCKS_AMOUNT * 4);
}
if (this.newBlockCallbacks.length) {
@@ -122,6 +137,10 @@ class Blocks {
return this.lastDifficultyAdjustmentTime;
}
public getPreviousDifficultyRetarget(): number {
return this.previousDifficultyRetarget;
}
public getCurrentBlockHeight(): number {
return this.currentBlockHeight;
}

View File

@@ -1,6 +1,8 @@
import { CpfpInfo, TransactionExtended, TransactionStripped } from '../mempool.interfaces';
import config from '../config';
export class Common {
static nativeAssetId = '6f0279e9ed041c3d710a9f57d0c02928416460c4b722ae3457a11eec381c526d';
static median(numbers: number[]) {
let medianNr = 0;
const numsLen = numbers.length;
@@ -105,7 +107,7 @@ export class Common {
totalFees += tx.bestDescendant.fee;
}
tx.effectiveFeePerVsize = totalFees / (totalWeight / 4);
tx.effectiveFeePerVsize = Math.max(config.MEMPOOL.NETWORK === 'liquid' ? 0.1 : 1, totalFees / (totalWeight / 4));
tx.cpfpChecked = true;
return {

View File

@@ -52,7 +52,7 @@ class DiskCache {
logger.debug('Mempool and blocks data saved to disk cache');
this.isWritingCache = false;
} catch (e) {
logger.warn('Error writing to cache file: ' + e.message || e);
logger.warn('Error writing to cache file: ' + (e instanceof Error ? e.message : e));
this.isWritingCache = false;
}
}

View File

@@ -1,6 +1,7 @@
import logger from '../logger';
import axios from 'axios';
import { IConversionRates } from '../mempool.interfaces';
import config from '../config';
class FiatConversion {
private conversionRates: IConversionRates = {
@@ -16,7 +17,7 @@ class FiatConversion {
public startService() {
logger.info('Starting currency rates service');
setInterval(this.updateCurrency.bind(this), 1000 * 60);
setInterval(this.updateCurrency.bind(this), 1000 * config.MEMPOOL.PRICE_FEED_UPDATE_INTERVAL);
this.updateCurrency();
}
@@ -35,7 +36,7 @@ class FiatConversion {
this.ratesChangedCallback(this.conversionRates);
}
} catch (e) {
logger.err('Error updating fiat conversion rates: ' + e);
logger.err('Error updating fiat conversion rates: ' + (e instanceof Error ? e.message : e));
}
}
}

View File

@@ -0,0 +1,111 @@
import { IBitcoinApi } from '../bitcoin/bitcoin-api.interface';
import bitcoinClient from '../bitcoin/bitcoin-client';
import bitcoinSecondClient from '../bitcoin/bitcoin-second-client';
import { Common } from '../common';
import { DB } from '../../database';
import logger from '../../logger';
class ElementsParser {
private isRunning = false;
constructor() { }
public async $parse() {
if (this.isRunning) {
return;
}
try {
this.isRunning = true;
const result = await bitcoinClient.getChainTips();
const tip = result[0].height;
const latestBlock = await this.$getLatestBlockFromDatabase();
for (let height = latestBlock.block + 1; height <= tip; height++) {
const blockHash: IBitcoinApi.ChainTips = await bitcoinClient.getBlockHash(height);
const block: IBitcoinApi.Block = await bitcoinClient.getBlock(blockHash, 2);
await this.$parseBlock(block);
await this.$saveLatestBlockToDatabase(block.height, block.time, block.hash);
}
this.isRunning = false;
} catch (e) {
this.isRunning = false;
throw new Error(e instanceof Error ? e.message : 'Error');
}
}
public async $getPegDataByMonth(): Promise<any> {
const connection = await DB.pool.getConnection();
const query = `SELECT SUM(amount) AS amount, DATE_FORMAT(FROM_UNIXTIME(datetime), '%Y-%m-01') AS date FROM elements_pegs GROUP BY DATE_FORMAT(FROM_UNIXTIME(datetime), '%Y%m')`;
const [rows] = await connection.query<any>(query);
connection.release();
return rows;
}
protected async $parseBlock(block: IBitcoinApi.Block) {
for (const tx of block.tx) {
await this.$parseInputs(tx, block);
await this.$parseOutputs(tx, block);
}
}
protected async $parseInputs(tx: IBitcoinApi.Transaction, block: IBitcoinApi.Block) {
for (const [index, input] of tx.vin.entries()) {
if (input.is_pegin) {
await this.$parsePegIn(input, index, tx.txid, block);
}
}
}
protected async $parsePegIn(input: IBitcoinApi.Vin, vindex: number, txid: string, block: IBitcoinApi.Block) {
const bitcoinTx: IBitcoinApi.Transaction = await bitcoinSecondClient.getRawTransaction(input.txid, true);
const prevout = bitcoinTx.vout[input.vout || 0];
const outputAddress = prevout.scriptPubKey.address || (prevout.scriptPubKey.addresses && prevout.scriptPubKey.addresses[0]) || '';
await this.$savePegToDatabase(block.height, block.time, prevout.value * 100000000, txid, vindex,
outputAddress, bitcoinTx.txid, prevout.n, 1);
}
protected async $parseOutputs(tx: IBitcoinApi.Transaction, block: IBitcoinApi.Block) {
for (const output of tx.vout) {
if (output.scriptPubKey.pegout_chain) {
await this.$savePegToDatabase(block.height, block.time, 0 - output.value * 100000000, tx.txid, output.n,
(output.scriptPubKey.pegout_addresses && output.scriptPubKey.pegout_addresses[0] || ''), '', 0, 0);
}
if (!output.scriptPubKey.pegout_chain && output.scriptPubKey.type === 'nulldata'
&& output.value && output.value > 0 && output.asset && output.asset === Common.nativeAssetId) {
await this.$savePegToDatabase(block.height, block.time, 0 - output.value * 100000000, tx.txid, output.n,
(output.scriptPubKey.pegout_addresses && output.scriptPubKey.pegout_addresses[0] || ''), '', 0, 1);
}
}
}
protected async $savePegToDatabase(height: number, blockTime: number, amount: number, txid: string,
txindex: number, bitcoinaddress: string, bitcointxid: string, bitcoinindex: number, final_tx: number): Promise<void> {
const connection = await DB.pool.getConnection();
const query = `INSERT INTO elements_pegs(
block, datetime, amount, txid, txindex, bitcoinaddress, bitcointxid, bitcoinindex, final_tx
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)`;
const params: (string | number)[] = [
height, blockTime, amount, txid, txindex, bitcoinaddress, bitcointxid, bitcoinindex, final_tx
];
await connection.query(query, params);
connection.release();
logger.debug(`Saved L-BTC peg from block height #${height} with TXID ${txid}.`);
}
protected async $getLatestBlockFromDatabase(): Promise<any> {
const connection = await DB.pool.getConnection();
const query = `SELECT block, datetime, block_hash FROM last_elements_block`;
const [rows] = await connection.query<any>(query);
connection.release();
return rows[0];
}
protected async $saveLatestBlockToDatabase(blockHeight: number, datetime: number, blockHash: string) {
const connection = await DB.pool.getConnection();
const query = `UPDATE last_elements_block SET block = ?, datetime = ?, block_hash = ?`;
await connection.query<any>(query, [blockHeight, datetime, blockHash]);
connection.release();
}
}
export default new ElementsParser();

View File

@@ -4,7 +4,6 @@ import { Common } from './common';
import config from '../config';
class MempoolBlocks {
private static DEFAULT_PROJECTED_BLOCKS_AMOUNT = 8;
private mempoolBlocks: MempoolBlockWithTransactions[] = [];
constructor() {}
@@ -72,29 +71,30 @@ class MempoolBlocks {
private calculateMempoolBlocks(transactionsSorted: TransactionExtended[]): MempoolBlockWithTransactions[] {
const mempoolBlocks: MempoolBlockWithTransactions[] = [];
let blockVSize = 0;
let blockWeight = 0;
let blockSize = 0;
let transactions: TransactionExtended[] = [];
transactionsSorted.forEach((tx) => {
if (blockVSize + tx.vsize <= 1000000 || mempoolBlocks.length === MempoolBlocks.DEFAULT_PROJECTED_BLOCKS_AMOUNT - 1) {
blockVSize += tx.vsize;
if (blockWeight + tx.weight <= config.MEMPOOL.BLOCK_WEIGHT_UNITS
|| mempoolBlocks.length === config.MEMPOOL.MEMPOOL_BLOCKS_AMOUNT - 1) {
blockWeight += tx.weight;
blockSize += tx.size;
transactions.push(tx);
} else {
mempoolBlocks.push(this.dataToMempoolBlocks(transactions, blockSize, blockVSize, mempoolBlocks.length));
blockVSize = tx.vsize;
mempoolBlocks.push(this.dataToMempoolBlocks(transactions, blockSize, blockWeight, mempoolBlocks.length));
blockWeight = tx.weight;
blockSize = tx.size;
transactions = [tx];
}
});
if (transactions.length) {
mempoolBlocks.push(this.dataToMempoolBlocks(transactions, blockSize, blockVSize, mempoolBlocks.length));
mempoolBlocks.push(this.dataToMempoolBlocks(transactions, blockSize, blockWeight, mempoolBlocks.length));
}
return mempoolBlocks;
}
private dataToMempoolBlocks(transactions: TransactionExtended[],
blockSize: number, blockVSize: number, blocksIndex: number): MempoolBlockWithTransactions {
blockSize: number, blockWeight: number, blocksIndex: number): MempoolBlockWithTransactions {
let rangeLength = 4;
if (blocksIndex === 0) {
rangeLength = 8;
@@ -106,7 +106,7 @@ class MempoolBlocks {
}
return {
blockSize: blockSize,
blockVSize: blockVSize,
blockVSize: blockWeight / 4,
nTx: transactions.length,
totalFees: transactions.reduce((acc, cur) => acc + cur.fee, 0),
medianFee: Common.percentile(transactions.map((tx) => tx.effectiveFeePerVsize), config.MEMPOOL.RECOMMENDED_FEE_PERCENTILE),

View File

@@ -5,8 +5,9 @@ import logger from '../logger';
import { Common } from './common';
import transactionUtils from './transaction-utils';
import { IBitcoinApi } from './bitcoin/bitcoin-api.interface';
import bitcoinBaseApi from './bitcoin/bitcoin-base.api';
import loadingIndicators from './loading-indicators';
import bitcoinClient from './bitcoin/bitcoin-client';
import bitcoinSecondClient from './bitcoin/bitcoin-second-client';
class Mempool {
private static WEBSOCKET_REFRESH_RATE_MS = 10000;
@@ -61,7 +62,7 @@ class Mempool {
}
public async $updateMemPoolInfo() {
this.mempoolInfo = await bitcoinBaseApi.$getMempoolInfo();
this.mempoolInfo = await this.$getMempoolInfo();
}
public getMempoolInfo(): IBitcoinApi.MempoolInfo {
@@ -124,7 +125,7 @@ class Mempool {
}
newTransactions.push(transaction);
} catch (e) {
logger.debug('Error finding transaction in mempool: ' + e.message || e);
logger.debug('Error finding transaction in mempool: ' + (e instanceof Error ? e.message : e));
}
}
@@ -205,6 +206,21 @@ class Mempool {
}
}
}
private $getMempoolInfo() {
if (config.MEMPOOL.USE_SECOND_NODE_FOR_MINFEE) {
return Promise.all([
bitcoinClient.getMempoolInfo(),
bitcoinSecondClient.getMempoolInfo()
]).then(([mempoolInfo, secondMempoolInfo]) => {
mempoolInfo.maxmempool = secondMempoolInfo.maxmempool;
mempoolInfo.mempoolminfee = secondMempoolInfo.mempoolminfee;
mempoolInfo.minrelaytxfee = secondMempoolInfo.minrelaytxfee;
return mempoolInfo;
});
}
return bitcoinClient.getMempoolInfo();
}
}
export default new Mempool();

View File

@@ -3,13 +3,14 @@ import { DB } from '../database';
import logger from '../logger';
import { Statistic, TransactionExtended, OptimizedStatistic } from '../mempool.interfaces';
import config from '../config';
class Statistics {
protected intervalTimer: NodeJS.Timer | undefined;
protected newStatisticsEntryCallback: ((stats: OptimizedStatistic) => void) | undefined;
protected queryTimeout = 120000;
protected cache: { [date: string]: OptimizedStatistic[] } = {
'24h': [], '1w': [], '1m': [], '3m': [], '6m': [], '1y': [],
'24h': [], '1w': [], '1m': [], '3m': [], '6m': [], '1y': [], '2y': [], '3y': []
};
public setNewStatisticsEntryCallback(fn: (stats: OptimizedStatistic) => void) {
@@ -48,6 +49,8 @@ class Statistics {
this.cache['3m'] = await this.$list3M();
this.cache['6m'] = await this.$list6M();
this.cache['1y'] = await this.$list1Y();
this.cache['2y'] = await this.$list2Y();
this.cache['3y'] = await this.$list3Y();
logger.debug('Statistics cache created');
}
@@ -82,10 +85,15 @@ class Statistics {
250, 300, 350, 400, 500, 600, 700, 800, 900, 1000, 1200, 1400, 1600, 1800, 2000];
const weightVsizeFees: { [feePerWU: number]: number } = {};
const lastItem = logFees.length - 1;
memPoolArray.forEach((transaction) => {
for (let i = 0; i < logFees.length; i++) {
if ((logFees[i] === 2000 && transaction.effectiveFeePerVsize >= 2000) || transaction.effectiveFeePerVsize <= logFees[i]) {
if (
(config.MEMPOOL.NETWORK === 'liquid' && (i === lastItem || transaction.effectiveFeePerVsize * 10 < logFees[i + 1]))
||
(config.MEMPOOL.NETWORK !== 'liquid' && (i === lastItem || transaction.effectiveFeePerVsize < logFees[i + 1]))
) {
if (weightVsizeFees[logFees[i]]) {
weightVsizeFees[logFees[i]] += transaction.vsize;
} else {
@@ -255,7 +263,7 @@ class Statistics {
connection.release();
return result.insertId;
} catch (e) {
logger.err('$create() error' + e.message || e);
logger.err('$create() error' + (e instanceof Error ? e.message : e));
}
}
@@ -313,7 +321,7 @@ class Statistics {
return this.mapStatisticToOptimizedStatistic([rows[0]])[0];
}
} catch (e) {
logger.err('$list2H() error' + e.message || e);
logger.err('$list2H() error' + (e instanceof Error ? e.message : e));
}
}
@@ -325,7 +333,7 @@ class Statistics {
connection.release();
return this.mapStatisticToOptimizedStatistic(rows);
} catch (e) {
logger.err('$list2H() error' + e.message || e);
logger.err('$list2H() error' + (e instanceof Error ? e.message : e));
return [];
}
}
@@ -338,7 +346,7 @@ class Statistics {
connection.release();
return this.mapStatisticToOptimizedStatistic(rows);
} catch (e) {
logger.err('$list24h() error' + e.message || e);
logger.err('$list24h() error' + (e instanceof Error ? e.message : e));
return [];
}
}
@@ -351,7 +359,7 @@ class Statistics {
connection.release();
return this.mapStatisticToOptimizedStatistic(rows);
} catch (e) {
logger.err('$list1W() error' + e);
logger.err('$list1W() error' + (e instanceof Error ? e.message : e));
return [];
}
}
@@ -364,7 +372,7 @@ class Statistics {
connection.release();
return this.mapStatisticToOptimizedStatistic(rows);
} catch (e) {
logger.err('$list1M() error' + e);
logger.err('$list1M() error' + (e instanceof Error ? e.message : e));
return [];
}
}
@@ -377,7 +385,7 @@ class Statistics {
connection.release();
return this.mapStatisticToOptimizedStatistic(rows);
} catch (e) {
logger.err('$list3M() error' + e);
logger.err('$list3M() error' + (e instanceof Error ? e.message : e));
return [];
}
}
@@ -390,7 +398,7 @@ class Statistics {
connection.release();
return this.mapStatisticToOptimizedStatistic(rows);
} catch (e) {
logger.err('$list6M() error' + e);
logger.err('$list6M() error' + (e instanceof Error ? e.message : e));
return [];
}
}
@@ -403,10 +411,37 @@ class Statistics {
connection.release();
return this.mapStatisticToOptimizedStatistic(rows);
} catch (e) {
logger.err('$list6M() error' + e);
logger.err('$list1Y() error' + (e instanceof Error ? e.message : e));
return [];
}
}
public async $list2Y(): Promise<OptimizedStatistic[]> {
try {
const connection = await DB.pool.getConnection();
const query = this.getQueryForDays(120960);
const [rows] = await connection.query<any>({ sql: query, timeout: this.queryTimeout });
connection.release();
return this.mapStatisticToOptimizedStatistic(rows);
} catch (e) {
logger.err('$list2Y() error' + (e instanceof Error ? e.message : e));
return [];
}
}
public async $list3Y(): Promise<OptimizedStatistic[]> {
try {
const connection = await DB.pool.getConnection();
const query = this.getQueryForDays(181440);
const [rows] = await connection.query<any>({ sql: query, timeout: this.queryTimeout });
connection.release();
return this.mapStatisticToOptimizedStatistic(rows);
} catch (e) {
logger.err('$list3Y() error' + (e instanceof Error ? e.message : e));
return [];
}
}
private mapStatisticToOptimizedStatistic(statistic: Statistic[]): OptimizedStatistic[] {
return statistic.map((s) => {
return {

View File

@@ -1,7 +1,7 @@
import bitcoinApi from './bitcoin/bitcoin-api-factory';
import logger from '../logger';
import { TransactionExtended, TransactionMinerInfo } from '../mempool.interfaces';
import { IEsploraApi } from './bitcoin/esplora-api.interface';
import config from '../config';
class TransactionUtils {
constructor() { }
@@ -31,7 +31,7 @@ class TransactionUtils {
// @ts-ignore
return transaction;
}
const feePerVbytes = Math.max(1, (transaction.fee || 0) / (transaction.weight / 4));
const feePerVbytes = Math.max(config.MEMPOOL.NETWORK === 'liquid' ? 0.1 : 1, (transaction.fee || 0) / (transaction.weight / 4));
const transactionExtended: TransactionExtended = Object.assign({
vsize: Math.round(transaction.weight / 4),
feePerVsize: feePerVbytes,

View File

@@ -14,7 +14,6 @@ import transactionUtils from './transaction-utils';
class WebsocketHandler {
private wss: WebSocket.Server | undefined;
private nativeAssetId = '6f0279e9ed041c3d710a9f57d0c02928416460c4b722ae3457a11eec381c526d';
private extraInitProperties = {};
constructor() { }
@@ -53,18 +52,25 @@ class WebsocketHandler {
if (parsedMessage['watch-mempool']) {
const tx = memPool.getMempool()[client['track-tx']];
if (tx) {
if (config.MEMPOOL.BACKEND !== 'esplora') {
if (config.MEMPOOL.BACKEND === 'esplora') {
response['tx'] = tx;
} else {
// tx.prevouts is missing from transactions when in bitcoind mode
try {
const fullTx = await transactionUtils.$getTransactionExtended(tx.txid, true);
response['tx'] = fullTx;
} catch (e) {
logger.debug('Error finding transaction in mempool: ' + e.message || e);
logger.debug('Error finding transaction: ' + (e instanceof Error ? e.message : e));
}
} else {
response['tx'] = tx;
}
} else {
client['track-mempool-tx'] = parsedMessage['track-tx'];
try {
const fullTx = await transactionUtils.$getTransactionExtended(client['track-tx'], true);
response['tx'] = fullTx;
} catch (e) {
logger.debug('Error finding transaction. ' + (e instanceof Error ? e.message : e));
client['track-mempool-tx'] = parsedMessage['track-tx'];
}
}
}
} else {
@@ -73,9 +79,13 @@ class WebsocketHandler {
}
if (parsedMessage && parsedMessage['track-address']) {
if (/^([a-km-zA-HJ-NP-Z1-9]{26,35}|[a-km-zA-HJ-NP-Z1-9]{80}|[a-z]{2,5}1[ac-hj-np-z02-9]{8,87})$/
if (/^([a-km-zA-HJ-NP-Z1-9]{26,35}|[a-km-zA-HJ-NP-Z1-9]{80}|[a-z]{2,5}1[ac-hj-np-z02-9]{8,100}|[A-Z]{2,5}1[AC-HJ-NP-Z02-9]{8,100})$/
.test(parsedMessage['track-address'])) {
client['track-address'] = parsedMessage['track-address'];
let matchedAddress = parsedMessage['track-address'];
if (/^[A-Z]{2,5}1[AC-HJ-NP-Z02-9]{8,100}$/.test(parsedMessage['track-address'])) {
matchedAddress = matchedAddress.toLowerCase();
}
client['track-address'] = matchedAddress;
} else {
client['track-address'] = null;
}
@@ -90,7 +100,7 @@ class WebsocketHandler {
}
if (parsedMessage.action === 'init') {
const _blocks = blocks.getBlocks().slice(-8);
const _blocks = blocks.getBlocks().slice(-config.MEMPOOL.INITIAL_BLOCKS_AMOUNT);
if (!_blocks) {
return;
}
@@ -117,7 +127,7 @@ class WebsocketHandler {
client.send(JSON.stringify(response));
}
} catch (e) {
logger.debug('Error parsing websocket message: ' + e.message || e);
logger.debug('Error parsing websocket message: ' + (e instanceof Error ? e.message : e));
}
});
});
@@ -166,12 +176,13 @@ class WebsocketHandler {
getInitData(_blocks?: BlockExtended[]) {
if (!_blocks) {
_blocks = blocks.getBlocks().slice(-8);
_blocks = blocks.getBlocks().slice(-config.MEMPOOL.INITIAL_BLOCKS_AMOUNT);
}
return {
'mempoolInfo': memPool.getMempoolInfo(),
'vBytesPerSecond': memPool.getVBytesPerSecond(),
'lastDifficultyAdjustment': blocks.getLastDifficultyAdjustmentTime(),
'previousRetarget': blocks.getPreviousDifficultyRetarget(),
'blocks': _blocks,
'conversions': fiatConversion.getConversionRates(),
'mempool-blocks': mempoolBlocks.getMempoolBlocks(),
@@ -244,7 +255,7 @@ class WebsocketHandler {
const fullTx = await transactionUtils.$getTransactionExtended(tx.txid, true);
response['tx'] = fullTx;
} catch (e) {
logger.debug('Error finding transaction in mempool: ' + e.message || e);
logger.debug('Error finding transaction in mempool: ' + (e instanceof Error ? e.message : e));
}
} else {
response['tx'] = tx;
@@ -264,7 +275,7 @@ class WebsocketHandler {
const fullTx = await transactionUtils.$getTransactionExtended(tx.txid, true);
foundTransactions.push(fullTx);
} catch (e) {
logger.debug('Error finding transaction in mempool: ' + e.message || e);
logger.debug('Error finding transaction in mempool: ' + (e instanceof Error ? e.message : e));
}
} else {
foundTransactions.push(tx);
@@ -278,7 +289,7 @@ class WebsocketHandler {
const fullTx = await transactionUtils.$getTransactionExtended(tx.txid, true);
foundTransactions.push(fullTx);
} catch (e) {
logger.debug('Error finding transaction in mempool: ' + e.message || e);
logger.debug('Error finding transaction in mempool: ' + (e instanceof Error ? e.message : e));
}
} else {
foundTransactions.push(tx);
@@ -296,7 +307,7 @@ class WebsocketHandler {
newTransactions.forEach((tx) => {
if (client['track-asset'] === this.nativeAssetId) {
if (client['track-asset'] === Common.nativeAssetId) {
if (tx.vin.some((vin) => !!vin.is_pegin)) {
foundTransactions.push(tx);
return;
@@ -329,7 +340,7 @@ class WebsocketHandler {
const fullTx = await transactionUtils.$getTransactionExtended(rbfTransaction, true);
response['rbfTransaction'] = fullTx;
} catch (e) {
logger.debug('Error finding transaction in mempool: ' + e.message || e);
logger.debug('Error finding transaction in mempool: ' + (e instanceof Error ? e.message : e));
}
} else {
response['rbfTransaction'] = rbfTx;
@@ -384,6 +395,7 @@ class WebsocketHandler {
'block': block,
'mempoolInfo': memPool.getMempoolInfo(),
'lastDifficultyAdjustment': blocks.getLastDifficultyAdjustmentTime(),
'previousRetarget': blocks.getPreviousDifficultyRetarget(),
};
if (mBlocks && client['want-mempool-blocks']) {
@@ -426,7 +438,7 @@ class WebsocketHandler {
const foundTransactions: TransactionExtended[] = [];
transactions.forEach((tx) => {
if (client['track-asset'] === this.nativeAssetId) {
if (client['track-asset'] === Common.nativeAssetId) {
if (tx.vin && tx.vin.some((vin) => !!vin.is_pegin)) {
foundTransactions.push(tx);
return;

View File

@@ -11,6 +11,11 @@ interface IConfig {
CACHE_DIR: string;
CLEAR_PROTECTION_MINUTES: number;
RECOMMENDED_FEE_PERCENTILE: number;
BLOCK_WEIGHT_UNITS: number;
INITIAL_BLOCKS_AMOUNT: number;
MEMPOOL_BLOCKS_AMOUNT: number;
PRICE_FEED_UPDATE_INTERVAL: number;
USE_SECOND_NODE_FOR_MINFEE: boolean;
};
ESPLORA: {
REST_API_URL: string;
@@ -26,8 +31,7 @@ interface IConfig {
USERNAME: string;
PASSWORD: string;
};
CORE_RPC_MINFEE: {
ENABLED: boolean;
SECOND_CORE_RPC: {
HOST: string;
PORT: number;
USERNAME: string;
@@ -69,6 +73,11 @@ const defaults: IConfig = {
'CACHE_DIR': './cache',
'CLEAR_PROTECTION_MINUTES': 20,
'RECOMMENDED_FEE_PERCENTILE': 50,
'BLOCK_WEIGHT_UNITS': 4000000,
'INITIAL_BLOCKS_AMOUNT': 8,
'MEMPOOL_BLOCKS_AMOUNT': 8,
'PRICE_FEED_UPDATE_INTERVAL': 3600,
'USE_SECOND_NODE_FOR_MINFEE': false,
},
'ESPLORA': {
'REST_API_URL': 'http://127.0.0.1:3000',
@@ -84,8 +93,7 @@ const defaults: IConfig = {
'USERNAME': 'mempool',
'PASSWORD': 'mempool'
},
'CORE_RPC_MINFEE': {
'ENABLED': false,
'SECOND_CORE_RPC': {
'HOST': '127.0.0.1',
'PORT': 8332,
'USERNAME': 'mempool',
@@ -121,7 +129,7 @@ class Config implements IConfig {
ESPLORA: IConfig['ESPLORA'];
ELECTRUM: IConfig['ELECTRUM'];
CORE_RPC: IConfig['CORE_RPC'];
CORE_RPC_MINFEE: IConfig['CORE_RPC_MINFEE'];
SECOND_CORE_RPC: IConfig['SECOND_CORE_RPC'];
DATABASE: IConfig['DATABASE'];
SYSLOG: IConfig['SYSLOG'];
STATISTICS: IConfig['STATISTICS'];
@@ -133,7 +141,7 @@ class Config implements IConfig {
this.ESPLORA = configs.ESPLORA;
this.ELECTRUM = configs.ELECTRUM;
this.CORE_RPC = configs.CORE_RPC;
this.CORE_RPC_MINFEE = configs.CORE_RPC_MINFEE;
this.SECOND_CORE_RPC = configs.SECOND_CORE_RPC;
this.DATABASE = configs.DATABASE;
this.SYSLOG = configs.SYSLOG;
this.STATISTICS = configs.STATISTICS;

View File

@@ -20,7 +20,7 @@ export async function checkDbConnection() {
logger.info('Database connection established.');
connection.release();
} catch (e) {
logger.err('Could not connect to database: ' + e.message || e);
logger.err('Could not connect to database: ' + (e instanceof Error ? e.message : e));
process.exit(1);
}
}

View File

@@ -20,6 +20,7 @@ import logger from './logger';
import backendInfo from './api/backend-info';
import loadingIndicators from './api/loading-indicators';
import mempool from './api/mempool';
import elementsParser from './api/liquid/elements-parser';
class Server {
private wss: WebSocket.Server | undefined;
@@ -68,7 +69,8 @@ class Server {
next();
})
.use(express.urlencoded({ extended: true }))
.use(express.json());
.use(express.text())
;
this.server = http.createServer(this.app);
this.wss = new WebSocket.Server({ server: this.server });
@@ -111,8 +113,8 @@ class Server {
try {
await memPool.$updateMemPoolInfo();
} catch (e) {
const msg = `updateMempoolInfo: ${(e.message || e)}`;
if (config.CORE_RPC_MINFEE.ENABLED) {
const msg = `updateMempoolInfo: ${(e instanceof Error ? e.message : e)}`;
if (config.MEMPOOL.USE_SECOND_NODE_FOR_MINFEE) {
logger.warn(msg);
} else {
logger.debug(msg);
@@ -123,7 +125,7 @@ class Server {
setTimeout(this.runMainUpdateLoop.bind(this), config.MEMPOOL.POLL_RATE_MS);
this.currentBackendRetryInterval = 5;
} catch (e) {
const loggerMsg = `runMainLoop error: ${(e.message || e)}. Retrying in ${this.currentBackendRetryInterval} sec.`;
const loggerMsg = `runMainLoop error: ${(e instanceof Error ? e.message : e)}. Retrying in ${this.currentBackendRetryInterval} sec.`;
if (this.currentBackendRetryInterval > 5) {
logger.warn(loggerMsg);
mempool.setOutOfSync();
@@ -141,6 +143,15 @@ class Server {
if (this.wss) {
websocketHandler.setWebsocketServer(this.wss);
}
if (config.MEMPOOL.NETWORK === 'liquid' && config.DATABASE.ENABLED) {
blocks.setNewBlockCallback(async () => {
try {
await elementsParser.$parse();
} catch (e) {
logger.warn('Elements parsing error: ' + (e instanceof Error ? e.message : e));
}
});
}
websocketHandler.setupConnectionHandling();
statistics.setNewStatisticsEntryCallback(websocketHandler.handleNewStatistic.bind(websocketHandler));
blocks.setNewBlockCallback(websocketHandler.handleNewBlock.bind(websocketHandler));
@@ -153,10 +164,13 @@ class Server {
this.app
.get(config.MEMPOOL.API_URL_PREFIX + 'transaction-times', routes.getTransactionTimes)
.get(config.MEMPOOL.API_URL_PREFIX + 'cpfp/:txId', routes.getCpfpInfo)
.get(config.MEMPOOL.API_URL_PREFIX + 'difficulty-adjustment', routes.getDifficultyChange)
.get(config.MEMPOOL.API_URL_PREFIX + 'fees/recommended', routes.getRecommendedFees)
.get(config.MEMPOOL.API_URL_PREFIX + 'fees/mempool-blocks', routes.getMempoolBlocks)
.get(config.MEMPOOL.API_URL_PREFIX + 'backend-info', routes.getBackendInfo)
.get(config.MEMPOOL.API_URL_PREFIX + 'init-data', routes.getInitData)
.get(config.MEMPOOL.API_URL_PREFIX + 'validate-address/:address', routes.validateAddress)
.post(config.MEMPOOL.API_URL_PREFIX + 'tx/push', routes.$postTransactionForm)
.get(config.MEMPOOL.API_URL_PREFIX + 'donations', async (req, res) => {
try {
const response = await axios.get('https://mempool.space/api/v1/donations', { responseType: 'stream', timeout: 10000 });
@@ -204,6 +218,8 @@ class Server {
.get(config.MEMPOOL.API_URL_PREFIX + 'statistics/3m', routes.get3MStatistics.bind(routes))
.get(config.MEMPOOL.API_URL_PREFIX + 'statistics/6m', routes.get6MStatistics.bind(routes))
.get(config.MEMPOOL.API_URL_PREFIX + 'statistics/1y', routes.get1YStatistics.bind(routes))
.get(config.MEMPOOL.API_URL_PREFIX + 'statistics/2y', routes.get2YStatistics.bind(routes))
.get(config.MEMPOOL.API_URL_PREFIX + 'statistics/3y', routes.get3YStatistics.bind(routes))
;
}
@@ -234,9 +250,12 @@ class Server {
.get(config.MEMPOOL.API_URL_PREFIX + 'mempool/txids', routes.getMempoolTxIds)
.get(config.MEMPOOL.API_URL_PREFIX + 'mempool/recent', routes.getRecentMempoolTransactions)
.get(config.MEMPOOL.API_URL_PREFIX + 'tx/:txId', routes.getTransaction)
.post(config.MEMPOOL.API_URL_PREFIX + 'tx', routes.$postTransaction)
.get(config.MEMPOOL.API_URL_PREFIX + 'tx/:txId/hex', routes.getRawTransaction)
.get(config.MEMPOOL.API_URL_PREFIX + 'tx/:txId/status', routes.getTransactionStatus)
.get(config.MEMPOOL.API_URL_PREFIX + 'tx/:txId/outspends', routes.getTransactionOutspends)
.get(config.MEMPOOL.API_URL_PREFIX + 'block/:hash', routes.getBlock)
.get(config.MEMPOOL.API_URL_PREFIX + 'block/:hash/header', routes.getBlockHeader)
.get(config.MEMPOOL.API_URL_PREFIX + 'blocks', routes.getBlocks)
.get(config.MEMPOOL.API_URL_PREFIX + 'blocks/:height', routes.getBlocks)
.get(config.MEMPOOL.API_URL_PREFIX + 'blocks/tip/height', routes.getBlockTipHeight)
@@ -250,6 +269,12 @@ class Server {
.get(config.MEMPOOL.API_URL_PREFIX + 'address-prefix/:prefix', routes.getAddressPrefix)
;
}
if (config.MEMPOOL.NETWORK === 'liquid' && config.DATABASE.ENABLED) {
this.app
.get(config.MEMPOOL.API_URL_PREFIX + 'liquid/pegs/month', routes.$getElementsPegsByMonth)
;
}
}
}

View File

@@ -17,6 +17,8 @@ import transactionUtils from './api/transaction-utils';
import blocks from './api/blocks';
import loadingIndicators from './api/loading-indicators';
import { Common } from './api/common';
import bitcoinClient from './api/bitcoin/bitcoin-client';
import elementsParser from './api/liquid/elements-parser';
class Routes {
constructor() {}
@@ -50,12 +52,20 @@ class Routes {
res.json(statistics.getCache()['1y']);
}
public get2YStatistics(req: Request, res: Response) {
res.json(statistics.getCache()['2y']);
}
public get3YStatistics(req: Request, res: Response) {
res.json(statistics.getCache()['3y']);
}
public getInitData(req: Request, res: Response) {
try {
const result = websocketHandler.getInitData();
res.json(result);
} catch (e) {
res.status(500).send(e.message);
res.status(500).send(e instanceof Error ? e.message : e);
}
}
@@ -74,7 +84,7 @@ class Routes {
const result = mempoolBlocks.getMempoolBlocks();
res.json(result);
} catch (e) {
res.status(500).send(e.message);
res.status(500).send(e instanceof Error ? e.message : e);
}
}
@@ -477,10 +487,24 @@ class Routes {
res.json(transaction);
} catch (e) {
let statusCode = 500;
if (e.message && e.message.indexOf('No such mempool or blockchain transaction') > -1) {
if (e instanceof Error && e instanceof Error && e.message && e.message.indexOf('No such mempool or blockchain transaction') > -1) {
statusCode = 404;
}
res.status(statusCode).send(e.message || e);
res.status(statusCode).send(e instanceof Error ? e.message : e);
}
}
public async getRawTransaction(req: Request, res: Response) {
try {
const transaction: IEsploraApi.Transaction = await bitcoinApi.$getRawTransaction(req.params.txId, true);
res.setHeader('content-type', 'text/plain');
res.send(transaction.hex);
} catch (e) {
let statusCode = 500;
if (e instanceof Error && e.message && e.message.indexOf('No such mempool or blockchain transaction') > -1) {
statusCode = 404;
}
res.status(statusCode).send(e instanceof Error ? e.message : e);
}
}
@@ -490,10 +514,10 @@ class Routes {
res.json(transaction.status);
} catch (e) {
let statusCode = 500;
if (e.message && e.message.indexOf('No such mempool or blockchain transaction') > -1) {
if (e instanceof Error && e.message && e.message.indexOf('No such mempool or blockchain transaction') > -1) {
statusCode = 404;
}
res.status(statusCode).send(e.message || e);
res.status(statusCode).send(e instanceof Error ? e.message : e);
}
}
@@ -502,7 +526,17 @@ class Routes {
const result = await bitcoinApi.$getBlock(req.params.hash);
res.json(result);
} catch (e) {
res.status(500).send(e.message || e);
res.status(500).send(e instanceof Error ? e.message : e);
}
}
public async getBlockHeader(req: Request, res: Response) {
try {
const blockHeader = await bitcoinApi.$getBlockHeader(req.params.hash);
res.setHeader('content-type', 'text/plain');
res.send(blockHeader);
} catch (e) {
res.status(500).send(e instanceof Error ? e.message : e);
}
}
@@ -539,7 +573,7 @@ class Routes {
res.json(returnBlocks);
} catch (e) {
loadingIndicators.setProgress('blocks', 100);
res.status(500).send(e.message || e);
res.status(500).send(e instanceof Error ? e.message : e);
}
}
@@ -558,13 +592,13 @@ class Routes {
transactions.push(transaction);
loadingIndicators.setProgress('blocktxs-' + req.params.hash, (i + 1) / endIndex * 100);
} catch (e) {
logger.debug('getBlockTransactions error: ' + e.message || e);
logger.debug('getBlockTransactions error: ' + (e instanceof Error ? e.message : e));
}
}
res.json(transactions);
} catch (e) {
loadingIndicators.setProgress('blocktxs-' + req.params.hash, 100);
res.status(500).send(e.message || e);
res.status(500).send(e instanceof Error ? e.message : e);
}
}
@@ -573,7 +607,7 @@ class Routes {
const blockHash = await bitcoinApi.$getBlockHash(parseInt(req.params.height, 10));
res.send(blockHash);
} catch (e) {
res.status(500).send(e.message || e);
res.status(500).send(e instanceof Error ? e.message : e);
}
}
@@ -587,10 +621,10 @@ class Routes {
const addressData = await bitcoinApi.$getAddress(req.params.address);
res.json(addressData);
} catch (e) {
if (e.message && e.message.indexOf('exceeds') > 0) {
return res.status(413).send(e.message);
if (e instanceof Error && e.message && (e.message.indexOf('too long') > 0 || e.message.indexOf('confirmed status') > 0)) {
return res.status(413).send(e instanceof Error ? e.message : e);
}
res.status(500).send(e.message || e);
res.status(500).send(e instanceof Error ? e.message : e);
}
}
@@ -604,10 +638,10 @@ class Routes {
const transactions = await bitcoinApi.$getAddressTransactions(req.params.address, req.params.txId);
res.json(transactions);
} catch (e) {
if (e.message && e.message.indexOf('exceeds') > 0) {
return res.status(413).send(e.message);
if (e instanceof Error && e.message && (e.message.indexOf('too long') > 0 || e.message.indexOf('confirmed status') > 0)) {
return res.status(413).send(e instanceof Error ? e.message : e);
}
res.status(500).send(e.message || e);
res.status(500).send(e instanceof Error ? e.message : e);
}
}
@@ -620,7 +654,7 @@ class Routes {
const blockHash = await bitcoinApi.$getAddressPrefix(req.params.prefix);
res.send(blockHash);
} catch (e) {
res.status(500).send(e.message || e);
res.status(500).send(e instanceof Error ? e.message : e);
}
}
@@ -641,7 +675,7 @@ class Routes {
const rawMempool = await bitcoinApi.$getRawMempool();
res.send(rawMempool);
} catch (e) {
res.status(500).send(e.message || e);
res.status(500).send(e instanceof Error ? e.message : e);
}
}
@@ -650,7 +684,7 @@ class Routes {
const result = await bitcoinApi.$getBlockHeightTip();
res.json(result);
} catch (e) {
res.status(500).send(e.message || e);
res.status(500).send(e instanceof Error ? e.message : e);
}
}
@@ -659,13 +693,120 @@ class Routes {
const result = await bitcoinApi.$getTxIdsForBlock(req.params.hash);
res.json(result);
} catch (e) {
res.status(500).send(e.message || e);
res.status(500).send(e instanceof Error ? e.message : e);
}
}
public async validateAddress(req: Request, res: Response) {
try {
const result = await bitcoinClient.validateAddress(req.params.address);
res.json(result);
} catch (e) {
res.status(500).send(e instanceof Error ? e.message : e);
}
}
public getTransactionOutspends(req: Request, res: Response) {
res.status(501).send('Not implemented');
}
public getDifficultyChange(req: Request, res: Response) {
try {
const DATime = blocks.getLastDifficultyAdjustmentTime();
const previousRetarget = blocks.getPreviousDifficultyRetarget();
const blockHeight = blocks.getCurrentBlockHeight();
const now = new Date().getTime() / 1000;
const diff = now - DATime;
const blocksInEpoch = blockHeight % 2016;
const progressPercent = (blocksInEpoch >= 0) ? blocksInEpoch / 2016 * 100 : 100;
const remainingBlocks = 2016 - blocksInEpoch;
const nextRetargetHeight = blockHeight + remainingBlocks;
let difficultyChange = 0;
if (remainingBlocks < 1870) {
if (blocksInEpoch > 0) {
difficultyChange = (600 / (diff / blocksInEpoch ) - 1) * 100;
}
if (difficultyChange > 300) {
difficultyChange = 300;
}
if (difficultyChange < -75) {
difficultyChange = -75;
}
}
const timeAvgDiff = difficultyChange * 0.1;
let timeAvgMins = 10;
if (timeAvgDiff > 0) {
timeAvgMins -= Math.abs(timeAvgDiff);
} else {
timeAvgMins += Math.abs(timeAvgDiff);
}
const timeAvg = timeAvgMins * 60;
const remainingTime = remainingBlocks * timeAvg;
const estimatedRetargetDate = remainingTime + now;
const result = {
progressPercent,
difficultyChange,
estimatedRetargetDate,
remainingBlocks,
remainingTime,
previousRetarget,
nextRetargetHeight,
timeAvg,
};
res.json(result);
} catch (e) {
res.status(500).send(e instanceof Error ? e.message : e);
}
}
public async $getElementsPegsByMonth(req: Request, res: Response) {
try {
const pegs = await elementsParser.$getPegDataByMonth();
res.json(pegs);
} catch (e) {
res.status(500).send(e instanceof Error ? e.message : e);
}
}
public async $postTransaction(req: Request, res: Response) {
res.setHeader('content-type', 'text/plain');
try {
let rawTx;
if (typeof req.body === 'object') {
rawTx = Object.keys(req.body)[0];
} else {
rawTx = req.body;
}
const txIdResult = await bitcoinApi.$sendRawTransaction(rawTx);
res.send(txIdResult);
} catch (e: any) {
res.status(400).send(e.message && e.code ? 'sendrawtransaction RPC error: ' + JSON.stringify({ code: e.code, message: e.message })
: (e.message || 'Error'));
}
}
public async $postTransactionForm(req: Request, res: Response) {
res.setHeader('content-type', 'text/plain');
const matches = /tx=([a-z0-9]+)/.exec(req.body);
let txHex = '';
if (matches && matches[1]) {
txHex = matches[1];
}
try {
const txIdResult = await bitcoinClient.sendRawTransaction(txHex);
res.send(txIdResult);
} catch (e: any) {
res.status(400).send(e.message && e.code ? 'sendrawtransaction RPC error: ' + JSON.stringify({ code: e.code, message: e.message })
: (e.message || 'Error'));
}
}
}
export default new Routes();

View File

@@ -2,7 +2,7 @@
"compilerOptions": {
"module": "commonjs",
"target": "esnext",
"lib": ["es2019"],
"lib": ["es2019", "dom"],
"strict": true,
"noImplicitAny": false,
"sourceMap": false,

View File

@@ -1,15 +1,14 @@
FROM node:12-buster-slim AS builder
FROM node:16.10.0-buster-slim AS builder
WORKDIR /build
COPY . .
RUN apt-get update
RUN apt-get install -y build-essential python3 pkg-config
RUN npm ci --production
RUN npm i typescript
RUN npm install
RUN npm run build
FROM node:12-buster-slim
FROM node:16.10.0-buster-slim
WORKDIR /backend

View File

@@ -1,7 +1,8 @@
FROM node:12-buster-slim AS builder
FROM node:16.10.0-buster-slim AS builder
ARG commitHash
ENV DOCKER_COMMIT_HASH=${commitHash}
ENV CYPRESS_INSTALL_BINARY=0
WORKDIR /build
COPY . .

View File

@@ -0,0 +1,18 @@
#!/bin/sh
VERSION=$1
IMAGE=""
if [ -z "${VERSION}" ]; then
echo "no version provided (i.e, v2.2.0), using latest tag"
VERSION="latest"
fi
for package in frontend backend; do
PACKAGE=mempool/"$package"
IMAGE="$PACKAGE":"$VERSION"
HASH=`docker pull $IMAGE > /dev/null && docker inspect $IMAGE | sed -n '/RepoDigests/{n;p;}' | grep -o '[0-9a-f]\{64\}'`
if [ -n "${HASH}" ]; then
echo "$IMAGE"@sha256:"$HASH"
fi
done

4
frontend/.gitignore vendored
View File

@@ -34,6 +34,7 @@ speed-measure-plugin.json
.history/*
# misc
/.angular/cache
/.sass-cache
/connect.lock
/coverage
@@ -59,3 +60,6 @@ generated-config.js
cypress/videos
cypress/screenshots
# Base index
src/index.html

View File

@@ -1,11 +1,50 @@
# mempool-frontend
## Transifex Project
## Contributing
This package is used for the https://mempool.space, https://liquid.network and https://bisq.markets websites - there are npm scripts to setup all three, which effectively change how BASE_MODULE is configured:
```
$ npm run config:defaults:mempool
$ npm run config:defaults:liquid
$ npm run config:defaults:bisq
```
Changes that affect the frontend codebase only can be done using the production backend so you don't need to spin up the entire Mempool infrastructure. This is very convenient in case you want to quickly improve the UI, fix typos or implement new features that don't require any backend changes.
Make your changes, install the project dependencies and run the frontend server as follows:
```
$ npm install
$ npm run serve:local-prod
```
The frontend will be available at http://localhost:4200/ and all API requests will be proxied to the production server at https://mempool.space
After making your changes, you can run our end-to-end automation suite and check for possible regressions:
Headless:
```
$ npm run config:defaults:mempool && npm run cypress:run
```
Interactive:
```
$ npm run config:defaults:mempool && npm run cypress:open
```
This will open the Cypress test runner, where you can select any of the test files to run.
If all tests are green, submit your PR and it will be reviewed by someone on the team as soon as possible.
## Translations: Transifex Project
The mempool frontend strings are localized into 20+ locales:
https://www.transifex.com/mempool/mempool/dashboard/
## Translators
### Translators
* Arabic @baro0k
* Czech @pixelmade2
@@ -27,8 +66,11 @@ https://www.transifex.com/mempool/mempool/dashboard/
* Slovenian @thepkbadger
* Finnish @bio_bitcoin
* Swedish @softsimon_
* Thai @Gusb3ll
* Turkish @stackmore
* Ukrainian @volbil
* Vietnamese @bitcoin_vietnam
* Chinese @wdljt
* Russian @TonyCrusoe @Bitconan
* Romanian @mirceavesa
* Macedonian @SkechBoy

View File

@@ -1,5 +1,8 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"cli": {
"analytics": false
},
"version": 1,
"newProjectRoot": "projects",
"projects": {
@@ -23,6 +26,10 @@
"translation": "src/locale/messages.ar.xlf",
"baseHref": "/ar/"
},
"ca": {
"translation": "src/locale/messages.ca.xlf",
"baseHref": "/ca/"
},
"cs": {
"translation": "src/locale/messages.cs.xlf",
"baseHref": "/cs/"
@@ -87,6 +94,10 @@
"translation": "src/locale/messages.sv.xlf",
"baseHref": "/sv/"
},
"th": {
"translation": "src/locale/messages.th.xlf",
"baseHref": "/th/"
},
"tr": {
"translation": "src/locale/messages.tr.xlf",
"baseHref": "/tr/"
@@ -107,13 +118,25 @@
"translation": "src/locale/messages.hu.xlf",
"baseHref": "/hu/"
},
"mk": {
"translation": "src/locale/messages.mk.xlf",
"baseHref": "/mk/"
},
"zh": {
"translation": "src/locale/messages.zh.xlf",
"baseHref": "/zh/"
},
"ro": {
"translation": "src/locale/messages.ro.xlf",
"baseHref": "/ro/"
},
"ru": {
"translation": "src/locale/messages.ru.xlf",
"baseHref": "/ru/"
},
"hi": {
"translation": "src/locale/messages.hi.xlf",
"baseHref": "/hi/"
}
}
},
@@ -126,7 +149,6 @@
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.app.json",
"aot": true,
"assets": [
"src/favicon.ico",
"src/resources",
@@ -138,7 +160,13 @@
],
"scripts": [
"generated-config.js"
]
],
"vendorChunk": true,
"extractLicenses": false,
"buildOptimizer": false,
"sourceMap": true,
"optimization": false,
"namedChunks": true
},
"configurations": {
"production": {
@@ -148,7 +176,14 @@
"with": "src/environments/environment.prod.ts"
}
],
"optimization": true,
"optimization": {
"scripts": true,
"styles": {
"minify": true,
"inlineCritical": false
},
"fonts": true
},
"outputHashing": "all",
"sourceMap": false,
"namedChunks": false,
@@ -167,7 +202,8 @@
}
]
}
}
},
"defaultConfiguration": ""
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
@@ -179,20 +215,20 @@
"browserTarget": "mempool:build:production"
},
"local": {
"proxyConfig": "proxy.conf.json",
"proxyConfig": "proxy.conf.local.js",
"verbose": true
},
"staging": {
"proxyConfig": "proxy.stg.conf.json",
"proxyConfig": "proxy.conf.js",
"disableHostCheck": true,
"host": "0.0.0.0",
"verbose": true
},
"local-prod": {
"proxyConfig": "proxy.prod.conf.json",
"proxyConfig": "proxy.conf.js",
"disableHostCheck": true,
"host": "0.0.0.0",
"verbose": true
"verbose": false
}
}
},
@@ -219,20 +255,6 @@
"scripts": []
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"tsconfig.app.json",
"tsconfig.spec.json",
"tsconfig.server.json",
"cypress/tsconfig.json"
],
"exclude": [
"**/node_modules/**"
]
}
},
"e2e": {
"builder": "@cypress/schematic:cypress",
"options": {
@@ -251,7 +273,9 @@
"options": {
"outputPath": "dist/mempool/server",
"main": "server.ts",
"tsConfig": "tsconfig.server.json"
"tsConfig": "tsconfig.server.json",
"sourceMap": true,
"optimization": false
},
"configurations": {
"production": {
@@ -266,7 +290,8 @@
"localize": true,
"optimization": true
}
}
},
"defaultConfiguration": ""
},
"serve-ssr": {
"builder": "@nguniversal/builders:ssr-dev-server",

View File

@@ -1,9 +1,15 @@
{
"projectId": "ry4br7",
"integrationFolder": "cypress/integration",
"supportFile": "cypress/support/index.ts",
"videosFolder": "cypress/videos",
"screenshotsFolder": "cypress/screenshots",
"pluginsFile": "cypress/plugins/index.js",
"fixturesFolder": "cypress/fixtures",
"baseUrl": "http://localhost:4200"
"baseUrl": "http://localhost:4200",
"video": false,
"retries": {
"runMode": 3,
"openMode": 0
}
}

View File

@@ -0,0 +1 @@
{"live-2h-chart":{"id":1319298,"added":"2021-07-23T18:27:34.000Z","unconfirmed_transactions":546,"tx_per_second":3.93333,"vbytes_per_second":1926,"mempool_byte_weight":1106656,"total_fee":6198583,"vsizes":[255,18128,43701,58534,17144,5532,4483,1759,2394,1089,1683,7409,751,101010,1151,592,1497,703,1369,4747,800,1221,0,0,712,0,0,0,0,0,0,0,0,0,0,0,0,0]}}

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +1,8 @@
describe('Bisq', () => {
const baseModule = Cypress.env("BASE_MODULE");
const basePath = (baseModule === 'bisq') ? '' : '/bisq';
beforeEach(() => {
cy.intercept('/sockjs-node/info*').as('socket');
cy.intercept('/bisq/api/markets/hloc?market=btc_usd&interval=day').as('hloc');
cy.intercept('/bisq/api/markets/ticker').as('ticker');
@@ -10,42 +12,77 @@ describe('Bisq', () => {
cy.intercept('/bisq/api/txs/*/*').as('txs');
cy.intercept('/bisq/api/blocks/*/*').as('blocks');
cy.intercept('/bisq/api/stats').as('stats');
});
it('loads the dashboard', () => {
cy.visit('/bisq');
cy.wait('@socket');
cy.wait('@hloc');
cy.wait('@ticker');
cy.wait('@markets');
cy.wait('@7d');
cy.wait('@trades');
Cypress.Commands.add('waitForDashboard', () => {
cy.wait('@socket');
cy.wait('@hloc');
cy.wait('@ticker');
cy.wait('@markets');
cy.wait('@7d');
cy.wait('@trades');
});
});
it('loads the transactions screen', () => {
cy.visit('/bisq');
cy.get('li:nth-of-type(2) > a').click().then(() => {
cy.wait('@txs');
if (baseModule === 'mempool' || baseModule === 'bisq') {
it('loads the dashboard', () => {
cy.visit(`${basePath}`);
cy.waitForSkeletonGone();
});
});
it('loads the blocks screen', () => {
cy.visit('/bisq');
cy.get('li:nth-of-type(3) > a').click().then(() => {
cy.wait('@blocks');
});
});
it('loads the stats screen', () => {
cy.visit('/bisq');
cy.get('li:nth-of-type(4) > a').click().then(() => {
cy.wait('@stats');
});
});
it('loads the api screen', () => {
cy.visit('/bisq');
cy.get('li:nth-of-type(5) > a').click().then(() => {
it('loads the transactions screen', () => {
cy.visit(`${basePath}`);
cy.waitForSkeletonGone();
cy.get('li:nth-of-type(2) > a').click().then(() => {
cy.get('.table > tr').should('have.length', 50);
});
});
});
it('loads the blocks screen', () => {
cy.visit(`${basePath}`);
cy.waitForSkeletonGone();
cy.get('li:nth-of-type(3) > a').click().then(() => {
cy.wait('@blocks');
cy.get('tbody tr').should('have.length', 10);
});
});
it('loads the stats screen', () => {
cy.visit(`${basePath}`);
cy.waitForSkeletonGone();
cy.get('li:nth-of-type(4) > a').click().then(() => {
cy.wait('@stats');
});
});
it('loads the api screen', () => {
cy.visit(`${basePath}`);
cy.waitForSkeletonGone();
cy.get('li:nth-of-type(5) > a').click().then(() => {
cy.get('.card').should('have.length.at.least', 1);
cy.get('.card').first().click();
cy.get('.card-body');
});
});
it('shows blocks pagination with 5 pages (desktop)', () => {
cy.viewport(760, 800);
cy.visit(`${basePath}/blocks`);
cy.waitForSkeletonGone();
cy.get('tbody tr').should('have.length', 10);
// 5 pages + 4 buttons = 9 buttons
cy.get('.pagination-container ul.pagination').first().children().should('have.length', 9);
});
it('shows blocks pagination with 3 pages (mobile)', () => {
cy.viewport(669, 800);
cy.visit(`${basePath}/blocks`);
cy.waitForSkeletonGone();
cy.get('tbody tr').should('have.length', 10);
// 3 pages + 4 buttons = 7 buttons
cy.get('.pagination-container ul.pagination').first().children().should('have.length', 7);
});
} else {
it.skip(`Tests cannot be run on the selected BASE_MODULE ${baseModule}`);
}
});

View File

@@ -1,81 +1,153 @@
describe('Liquid', () => {
const baseModule = Cypress.env("BASE_MODULE");
const basePath = (baseModule === 'liquid') ? '' : '/liquid';
beforeEach(() => {
// TODO: Fix ng serve to deliver these files
cy.fixture('assets.minimal').then((json) => {
cy.intercept('/resources/assets.minimal.json', json);
cy.intercept('/liquid/api/block/**').as('block');
cy.intercept('/liquid/api/blocks/').as('blocks');
cy.intercept('/liquid/api/tx/**/outspends').as('outspends');
cy.intercept('/liquid/api/block/**/txs/**').as('block-txs');
cy.intercept('/resources/pools.json').as('pools');
Cypress.Commands.add('waitForBlockData', () => {
cy.wait('@socket');
cy.wait('@block');
cy.wait('@outspends');
});
});
if (baseModule === 'mempool' || baseModule === 'liquid') {
it('check first mempool block after skeleton loads', () => {
cy.visit(`${basePath}`);
cy.waitForSkeletonGone();
cy.get('#mempool-block-0 > .blockLink').should('exist');
});
cy.fixture('assets').then((json) => {
cy.intercept('/resources/assets.json', json);
it('loads the dashboard', () => {
cy.visit(`${basePath}`);
cy.waitForSkeletonGone();
});
});
it('loads the dashboard', () => {
cy.visit('/liquid');
});
it('loads the blocks page', () => {
cy.visit('/liquid/blocks');
});
it('loads a specific block page', () => {
cy.visit('/liquid/blocks');
});
it('loads the graphs page', () => {
cy.visit('/liquid/graphs');
});
it('loads the tv page - desktop', () => {
cy.visit('/liquid');
cy.get('li:nth-of-type(3) > a').click().then(() => {
cy.wait(1000);
it('loads the blocks page', () => {
cy.visit(`${basePath}/blocks`);
cy.waitForSkeletonGone();
});
});
it('loads the graphs page - mobile', () => {
cy.visit('/liquid');
cy.get('li:nth-of-type(3) > a').click().then(() => {
cy.viewport('iphone-6');
cy.wait(1000);
// TODO: Should we really support TV Mode in Mobile for Bisq?
// cy.get('.tv-only').should('be.visible')
it('loads a specific block page', () => {
cy.visit(`${basePath}/block/7e1369a23a5ab861e7bdede2aadcccae4ea873ffd9caf11c7c5541eb5bcdff54`);
cy.waitForSkeletonGone();
});
});
describe('assets', () => {
it('shows the assets screen', () => {
cy.visit('/liquid');
cy.get('li:nth-of-type(5) > a').click().then(() => {
cy.get('table tr').should('have.length', 5);
it('loads the graphs page', () => {
cy.visit(`${basePath}/graphs`);
cy.waitForSkeletonGone();
});
});
it('allows searching assets', () => {
cy.visit('/liquid');
cy.get('li:nth-of-type(5) > a').click().then(() => {
cy.get('.container-xl input').click().type('Liquid Bitcoin').then(() => {
cy.get('table tr').should('have.length', 1);
it('loads the tv page - desktop', () => {
cy.visit(`${basePath}`);
cy.waitForSkeletonGone();
cy.get('li:nth-of-type(3) > a').click().then(() => {
cy.wait(1000);
});
});
});
it('shows a specific asset ID', () => {
cy.visit('/liquid');
cy.get('li:nth-of-type(5) > a').click().then(() => {
cy.get('.container-xl input').click().type('Liquid CAD').then(() => {
cy.get('table tr td:nth-of-type(4) a').click();
it('loads the graphs page - mobile', () => {
cy.visit(`${basePath}`)
cy.waitForSkeletonGone();
cy.get('li:nth-of-type(3) > a').click().then(() => {
cy.viewport('iphone-6');
cy.wait(1000);
cy.get('.tv-only').should('not.exist');
});
});
});
it('shows a specific asset issuance TX', () => {
cy.visit('/liquid');
cy.get('li:nth-of-type(5) > a').click().then(() => {
cy.get('.container-xl input').click().type('Liquid CAD').then(() => {
cy.get('table tr td:nth-of-type(5) a').click();
describe('assets', () => {
it('shows the assets screen', () => {
cy.visit(`${basePath}/assets`);
cy.waitForSkeletonGone();
cy.get('table tr').should('have.length.at.least', 5);
});
it('allows searching assets', () => {
cy.visit(`${basePath}/assets`);
cy.waitForSkeletonGone();
cy.get('.container-xl input').click().type('Liquid Bitcoin').then(() => {
cy.get('table tr').should('have.length', 1);
});
});
it('shows a specific asset ID', () => {
cy.visit(`${basePath}/assets`);
cy.waitForSkeletonGone();
cy.get('.container-xl input').click().type('Liquid AUD').then(() => {
cy.get('table tr td:nth-of-type(1) a').click();
});
});
});
});
});
describe('unblinded TX', () => {
it('should not show an unblinding error message for regular txs', () => {
cy.visit(`${basePath}/tx/82a479043ec3841e0d3f829afc8df4f0e2bbd675a13f013ea611b2fde0027d45`);
cy.waitForSkeletonGone();
cy.get('.error-unblinded' ).should('not.exist');
});
it('show unblinded TX', () => {
cy.visit(`${basePath}/tx/f2f41c0850e8e7e3f1af233161fd596662e67c11ef10ed15943884186fbb7f46#blinded=100000,6f0279e9ed041c3d710a9f57d0c02928416460c4b722ae3457a11eec381c526d,0ab9f70650f16b1db8dfada05237f7d0d65191c3a13183da8a2ddddfbde9a2ad,fd98b2edc5530d76acd553f206a431f4c1fab27e10e290ad719582af878e98fc,2364760,6f0279e9ed041c3d710a9f57d0c02928416460c4b722ae3457a11eec381c526d,90c7a43b15b905bca045ca42a01271cfe71d2efe3133f4197792c24505cb32ed,12eb5959d9293b8842e7dd8bc9aa9639fd3fd031c5de3ba911adeca94eb57a3a`);
cy.waitForSkeletonGone();
cy.get('#table-tx-vin tr').should('have.class', 'assetBox');
cy.get('#table-tx-vout tr').should('have.class', 'assetBox');
});
it('show empty unblinded TX', () => {
cy.visit(`${basePath}/tx/f2f41c0850e8e7e3f1af233161fd596662e67c11ef10ed15943884186fbb7f46#blinded=`);
cy.waitForSkeletonGone();
cy.get('#table-tx-vin tr').should('have.class', '');
cy.get('#table-tx-vout tr').should('have.class', '');
});
it('show invalid unblinded TX hex', () => {
cy.visit(`${basePath}/tx/f2f41c0850e8e7e3f1af233161fd596662e67c11ef10ed15943884186fbb7f46#blinded=123`);
cy.waitForSkeletonGone();
cy.get('#table-tx-vin tr').should('have.class', '');
cy.get('#table-tx-vout tr').should('have.class', '');
cy.get('.error-unblinded' ).contains('Error: Invalid blinding data (invalid hex)');
});
it('show first unblinded vout', () => {
cy.visit(`${basePath}/tx/f2f41c0850e8e7e3f1af233161fd596662e67c11ef10ed15943884186fbb7f46#blinded=100000,6f0279e9ed041c3d710a9f57d0c02928416460c4b722ae3457a11eec381c526d,0ab9f70650f16b1db8dfada05237f7d0d65191c3a13183da8a2ddddfbde9a2ad,fd98b2edc5530d76acd553f206a431f4c1fab27e10e290ad719582af878e98fc`);
cy.waitForSkeletonGone();
cy.get('#table-tx-vout tr:first-child()').should('have.class', 'assetBox');
});
it('show second unblinded vout', () => {
cy.visit(`${basePath}/tx/f2f41c0850e8e7e3f1af233161fd596662e67c11ef10ed15943884186fbb7f46#blinded=2364760,6f0279e9ed041c3d710a9f57d0c02928416460c4b722ae3457a11eec381c526d,90c7a43b15b905bca045ca42a01271cfe71d2efe3133f4197792c24505cb32ed,12eb5959d9293b8842e7dd8bc9aa9639fd3fd031c5de3ba911adeca94eb57a3a`);
cy.get('#table-tx-vout tr').should('have.class', 'assetBox');
});
it('show invalid error unblinded TX', () => {
cy.visit(`${basePath}/tx/f2f41c0850e8e7e3f1af233161fd596662e67c11ef10ed15943884186fbb7f46#blinded=100000,6f0279e9ed041c3d710a9f57d0c02928416460c4b722ae3457a11eec381c526d,0ab9f70650f16b1db8dfada05237f7d0d65191c3a13183da8a2ddddfbde9a2ad,fd98b2edc5530d76acd553f206a431f4c1fab27e10e290ad719582af878e98fc,2364760,6f0279e9ed041c3d710a9f57d0c02928416460c4b722ae3457a11eec381c526d,90c7a43b15b905bca045ca42a01271cfe71d2efe3133f4197792c24505cb32ed,12eb5959d9293b8842e7dd8bc9aa9639fd3fd031c5de3ba911adeca94eb57a3c`);
cy.waitForSkeletonGone();
cy.get('#table-tx-vout tr').should('have.class', 'assetBox');
cy.get('.error-unblinded' ).contains('Error: Invalid blinding data.');
});
it('shows asset peg in/out and burn transactions', () => {
cy.visit(`${basePath}/asset/6f0279e9ed041c3d710a9f57d0c02928416460c4b722ae3457a11eec381c526d`);
cy.waitForSkeletonGone();
cy.get('#table-tx-vout tr').not('.assetBox');
cy.get('#table-tx-vin tr').not('.assetBox');
});
it('prevents regressing issue #644', () => {
cy.visit(`${basePath}/tx/393b890966f305e7c440fcfb12a13f51a7a9011cc59ff5f14f6f93214261bd82`);
cy.waitForSkeletonGone();
});
});
} else {
it.skip(`Tests cannot be run on the selected BASE_MODULE ${baseModule}`);
}
});

View File

@@ -1,98 +1,434 @@
import { emitMempoolInfo, dropWebSocket } from "../../support/websocket";
const baseModule = Cypress.env("BASE_MODULE");
describe('Mainnet', () => {
beforeEach(() => {
//cy.intercept('/sockjs-node/info*').as('socket');
cy.intercept('/api/block-height/*').as('block-height');
cy.intercept('/api/block/*').as('block');
cy.intercept('/api/block/*/txs/0').as('block-txs');
cy.intercept('/api/tx/*/outspends').as('tx-outspends');
cy.intercept('/resources/pools.json').as('pools');
// TODO: Fix ng serve to deliver this file
cy.fixture('pools').then((json) => {
cy.intercept('/resources/pools.json', json);
});
});
// Search Auto Complete
cy.intercept('/api/address-prefix/1wiz').as('search-1wiz');
cy.intercept('/api/address-prefix/1wizS').as('search-1wizS');
cy.intercept('/api/address-prefix/1wizSA').as('search-1wizSA');
it('loads the dashboard', () => {
cy.visit('/');
cy.wait(1000);
});
it('loads the blocks screen', () => {
cy.visit('/');
cy.get('li:nth-of-type(2) > a').click().then(() => {
cy.wait(1000);
});
});
it('loads the graphs screen', () => {
cy.visit('/');
cy.get('li:nth-of-type(3) > a').click().then(() => {
cy.wait(1000);
});
});
describe('tv mode', () => {
it('loads the tv screen - desktop', () => {
cy.viewport('macbook-16');
cy.visit('/');
cy.get('li:nth-of-type(4) > a').click().then(() => {
cy.viewport('macbook-16');
cy.wait(1000);
cy.get('.blockchain-wrapper').should('be.visible');
});
});
it('loads the tv screen - mobile', () => {
cy.visit('/');
cy.get('li:nth-of-type(4) > a').click().then(() => {
cy.viewport('iphone-6');
cy.wait(1000);
cy.get('.blockchain-wrapper').should('not.be.visible');
});
});
});
it('loads the api screen', () => {
cy.visit('/');
cy.get('li:nth-of-type(5) > a').click().then(() => {
cy.wait(1000);
});
});
describe('blocks', () => {
it('shows empty blocks properly', () => {
cy.visit('/block/0000000000000000000bd14f744ef2e006e61c32214670de7eb891a5732ee775');
cy.get('h2').invoke('text').should('equal', '1 transaction');
});
it('expands and collapses the block details', () => {
cy.visit('/block/0');
Cypress.Commands.add('waitForBlockData', () => {
cy.wait('@tx-outspends');
cy.get('.btn.btn-outline-info').click().then(() => {
cy.get('#details').should('be.visible');
});
cy.wait('@pools');
});
});
cy.get('.btn.btn-outline-info').click().then(() => {
cy.get('#details').should('not.be.visible');
if (baseModule === 'mempool') {
it('check first mempool block after skeleton loads', () => {
cy.visit('/');
cy.waitForSkeletonGone();
cy.get('#mempool-block-0 > .blockLink').should('exist');
});
it('loads the status screen', () => {
cy.visit('/status');
cy.get('#mempool-block-0').should('be.visible');
cy.get('[id^="bitcoin-block-"]').should('have.length', 8);
cy.get('.footer').should('be.visible');
cy.get('.row > :nth-child(1)').invoke('text').then((text) => {
expect(text).to.match(/Tx vBytes per second:.* vB\/s/);
});
cy.get('.row > :nth-child(2)').invoke('text').then((text) => {
expect(text).to.match(/Unconfirmed:(.*)/);
});
cy.get('.row > :nth-child(3)').invoke('text').then((text) => {
expect(text).to.match(/Mempool size:(.*) (kB|MB) \((\d+) (block|blocks)\)/);
});
});
it('shows blocks with no pagination', () => {
cy.visit('/block/00000000000000000001ba40caf1ad4cec0ceb77692662315c151953bfd7c4c4');
cy.get('h2').invoke('text').should('equal', '19 transactions');
cy.get('ul.pagination').first().children().should('have.length', 5);
it('loads dashboard, drop websocket and reconnect', () => {
cy.viewport('macbook-16');
cy.mockMempoolSocket();
cy.visit('/');
cy.get('.badge').should('not.exist');
dropWebSocket();
cy.get('.badge').should('be.visible');
cy.get('.badge', {timeout: 25000}).should('not.exist');
emitMempoolInfo({
'params': {
loaded: true
}
});
cy.get(':nth-child(1) > #bitcoin-block-0').should('not.exist');
cy.get(':nth-child(2) > #bitcoin-block-0').should('not.exist');
cy.get(':nth-child(3) > #bitcoin-block-0').should('not.exist');
});
it('supports pagination on the block screen', () => {
// 41 txs
cy.visit('/block/00000000000000000009f9b7b0f63ad50053ad12ec3b7f5ca951332f134f83d8');
cy.get('.header-bg.box > a').invoke('text').then((text1) => {
cy.get('.active + li').first().click().then(() => {
cy.get('.header-bg.box > a').invoke('text').then((text2) => {
expect(text1).not.to.eq(text2);
it('loads the dashboard', () => {
cy.visit('/');
cy.waitForSkeletonGone();
});
it('check op_return tx tooltip', () => {
cy.visit('/block/00000000000000000003c5f542bed265319c6cf64238cf1f1bb9bca3ebf686d2');
cy.waitForSkeletonGone();
cy.get('tbody > :nth-child(2) > :nth-child(1) > a').first().trigger('onmouseover');
cy.get('tbody > :nth-child(2) > :nth-child(1) > a').first().trigger('mouseenter');
cy.get('.tooltip-inner').should('be.visible');
});
it('check op_return coinbase tooltip', () => {
cy.visit('/block/00000000000000000003c5f542bed265319c6cf64238cf1f1bb9bca3ebf686d2');
cy.waitForSkeletonGone();
cy.get('div > a > .badge').first().trigger('onmouseover');
cy.get('div > a > .badge').first().trigger('mouseenter');
cy.get('.tooltip-inner').should('be.visible');
});
describe('search', () => {
it('allows searching for partial Bitcoin addresses', () => {
cy.visit('/');
cy.get('.search-box-container > .form-control').type('1wiz').then(() => {
cy.wait('@search-1wiz');
cy.get('ngb-typeahead-window button.dropdown-item').should('have.length', 10);
});
cy.get('.search-box-container > .form-control').type('S').then(() => {
cy.wait('@search-1wizS');
cy.get('ngb-typeahead-window button.dropdown-item').should('have.length', 5);
});
cy.get('.search-box-container > .form-control').type('A').then(() => {
cy.wait('@search-1wizSA');
cy.get('ngb-typeahead-window button.dropdown-item').should('have.length', 1)
});
cy.get('ngb-typeahead-window button.dropdown-item.active').click().then(() => {
cy.url().should('include', '/address/1wizSAYSbuyXbt9d8JV8ytm5acqq2TorC');
cy.waitForSkeletonGone();
cy.get('.text-center').should('not.have.text', 'Invalid Bitcoin address');
});
});
['BC1PQYQSZQ', 'bc1PqYqSzQ'].forEach((searchTerm) => {
it(`allows searching for partial case insensitive bech32m addresses: ${searchTerm}`, () => {
cy.visit('/');
cy.get('.search-box-container > .form-control').type(searchTerm).then(() => {
cy.get('ngb-typeahead-window button.dropdown-item').should('have.length', 1);
cy.get('ngb-typeahead-window button.dropdown-item.active').click().then(() => {
cy.url().should('include', '/address/bc1pqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqsyjer9e');
cy.waitForSkeletonGone();
cy.get('.text-center').should('not.have.text', 'Invalid Bitcoin address');
});
});
});
});
['BC1Q000375VXCU', 'bC1q000375vXcU'].forEach((searchTerm) => {
it(`allows searching for partial case insensitive bech32 addresses: ${searchTerm}`, () => {
cy.visit('/');
cy.get('.search-box-container > .form-control').type(searchTerm).then(() => {
cy.get('ngb-typeahead-window button.dropdown-item').should('have.length', 1);
cy.get('ngb-typeahead-window button.dropdown-item.active').click().then(() => {
cy.url().should('include', '/address/bc1q000375vxcuf5v04lmwy22vy2thvhqkxghgq7dy');
cy.waitForSkeletonGone();
cy.get('.text-center').should('not.have.text', 'Invalid Bitcoin address');
});
});
});
});
});
describe('blocks navigation', () => {
describe('keyboard events', () => {
it('loads first blockchain blocks visible and keypress arrow right', () => {
cy.viewport('macbook-16');
cy.visit('/');
cy.waitForSkeletonGone();
cy.get('.blockchain-blocks-0 > a').click().then(() => {
cy.get('[ngbtooltip="Next Block"] > .ng-fa-icon > .svg-inline--fa').should('not.exist');
cy.get('[ngbtooltip="Previous Block"] > .ng-fa-icon > .svg-inline--fa').should('be.visible');
cy.waitForPageIdle();
cy.document().right();
cy.get('[ngbtooltip="Next Block"] > .ng-fa-icon > .svg-inline--fa').should('be.visible');
cy.get('[ngbtooltip="Previous Block"] > .ng-fa-icon > .svg-inline--fa').should('be.visible');
});
});
it('loads first blockchain blocks visible and keypress arrow left', () => {
cy.viewport('macbook-16');
cy.visit('/');
cy.waitForSkeletonGone();
cy.get('.blockchain-blocks-0 > a').click().then(() => {
cy.waitForPageIdle();
cy.get('[ngbtooltip="Next Block"] > .ng-fa-icon > .svg-inline--fa').should('not.exist');
cy.get('[ngbtooltip="Previous Block"] > .ng-fa-icon > .svg-inline--fa').should('be.visible');
cy.document().left();
cy.get('.title-block h1').invoke('text').should('equal', 'Next block');
});
});
it('loads last blockchain blocks and keypress arrow right', () => {
cy.viewport('macbook-16');
cy.visit('/');
cy.waitForSkeletonGone();
cy.get('.blockchain-blocks-4 > a').click().then(() => {
cy.waitForPageIdle();
// block 6
cy.document().right();
cy.wait(5000);
cy.get('[ngbtooltip="Next Block"] > .ng-fa-icon > .svg-inline--fa').should('be.visible');
cy.get('[ngbtooltip="Previous Block"] > .ng-fa-icon > .svg-inline--fa').should('be.visible');
// block 7
cy.document().right();
cy.wait(5000);
cy.get('[ngbtooltip="Next Block"] > .ng-fa-icon > .svg-inline--fa').should('be.visible');
cy.get('[ngbtooltip="Previous Block"] > .ng-fa-icon > .svg-inline--fa').should('be.visible');
// block 8 - last visible block
cy.document().right();
cy.wait(5000);
cy.get('[ngbtooltip="Next Block"] > .ng-fa-icon > .svg-inline--fa').should('be.visible');
cy.get('[ngbtooltip="Previous Block"] > .ng-fa-icon > .svg-inline--fa').should('be.visible');
// block 9 - not visible at the blochchain blocks visible block
cy.document().right();
cy.wait(5000);
cy.get('[ngbtooltip="Next Block"] > .ng-fa-icon > .svg-inline--fa').should('be.visible');
cy.get('[ngbtooltip="Previous Block"] > .ng-fa-icon > .svg-inline--fa').should('be.visible');
});
});
it('loads genesis block and keypress arrow right', () => {
cy.viewport('macbook-16');
cy.visit('/block/0');
cy.waitForSkeletonGone();
cy.waitForPageIdle();
cy.document().right();
cy.wait(5000);
cy.get('[ngbtooltip="Next Block"] > .ng-fa-icon > .svg-inline--fa').should('be.visible');
cy.get('[ngbtooltip="Previous Block"] > .ng-fa-icon > .svg-inline--fa').should('not.exist');
});
it('loads genesis block and keypress arrow left', () => {
cy.viewport('macbook-16');
cy.visit('/block/0');
cy.waitForSkeletonGone();
cy.waitForPageIdle();
cy.document().left();
cy.wait(5000);
cy.get('[ngbtooltip="Next Block"] > .ng-fa-icon > .svg-inline--fa').should('be.visible');
cy.get('[ngbtooltip="Previous Block"] > .ng-fa-icon > .svg-inline--fa').should('be.visible');
});
});
describe('mouse events', () => {
it('loads first blockchain blocks visible and click on the arrow right', () => {
cy.viewport('macbook-16');
cy.visit('/');
cy.waitForSkeletonGone();
cy.get('.blockchain-blocks-0 > a').click().then(() => {
cy.waitForPageIdle();
cy.get('[ngbtooltip="Next Block"] > .ng-fa-icon > .svg-inline--fa').should('not.exist');
cy.get('[ngbtooltip="Previous Block"] > .ng-fa-icon > .svg-inline--fa').should('be.visible');
cy.get('[ngbtooltip="Previous Block"] > .ng-fa-icon > .svg-inline--fa').click().then(() => {
cy.get('[ngbtooltip="Next Block"] > .ng-fa-icon > .svg-inline--fa').should('be.visible');
cy.get('[ngbtooltip="Previous Block"] > .ng-fa-icon > .svg-inline--fa').should('be.visible');
});
});
});
it('loads genesis block and click on the arrow left', () => {
cy.viewport('macbook-16');
cy.visit('/block/0');
cy.waitForSkeletonGone();
cy.waitForPageIdle();
cy.get('[ngbtooltip="Next Block"] > .ng-fa-icon > .svg-inline--fa').should('be.visible');
cy.get('[ngbtooltip="Previous Block"] > .ng-fa-icon > .svg-inline--fa').should('not.exist');
cy.get('[ngbtooltip="Next Block"] > .ng-fa-icon > .svg-inline--fa').click().then(() => {
cy.get('[ngbtooltip="Next Block"] > .ng-fa-icon > .svg-inline--fa').should('be.visible');
cy.get('[ngbtooltip="Previous Block"] > .ng-fa-icon > .svg-inline--fa').should('be.visible');
});
});
});
});
});
it('loads skeleton when changes between networks', () => {
cy.visit('/');
cy.waitForSkeletonGone();
cy.changeNetwork("testnet");
cy.changeNetwork("signet");
cy.changeNetwork("liquid");
cy.changeNetwork("mainnet");
cy.changeNetwork("bisq");
});
it.skip('loads the dashboard with the skeleton blocks', () => {
cy.mockMempoolSocket();
cy.visit("/");
cy.get(':nth-child(1) > #bitcoin-block-0').should('be.visible');
cy.get(':nth-child(2) > #bitcoin-block-0').should('be.visible');
cy.get(':nth-child(3) > #bitcoin-block-0').should('be.visible');
cy.get('#mempool-block-0').should('be.visible');
cy.get('#mempool-block-1').should('be.visible');
cy.get('#mempool-block-2').should('be.visible');
emitMempoolInfo({
'params': {
loaded: true
}
});
cy.get(':nth-child(1) > #bitcoin-block-0').should('not.exist');
cy.get(':nth-child(2) > #bitcoin-block-0').should('not.exist');
cy.get(':nth-child(3) > #bitcoin-block-0').should('not.exist');
});
it('loads the blocks screen', () => {
cy.visit('/');
cy.waitForSkeletonGone();
cy.get('li:nth-of-type(2) > a').click().then(() => {
cy.waitForPageIdle();
});
});
it('loads the graphs screen', () => {
cy.visit('/');
cy.waitForSkeletonGone();
cy.get('li:nth-of-type(3) > a').click().then(() => {
cy.wait(1000);
});
});
describe('graphs page', () => {
it('check buttons - mobile', () => {
cy.viewport('iphone-6');
cy.visit('/graphs');
cy.waitForSkeletonGone();
cy.get('.small-buttons > :nth-child(2)').should('be.visible');
cy.get('#dropdownFees').should('be.visible');
cy.get('.btn-group').should('be.visible');
});
it('check buttons - tablet', () => {
cy.viewport('ipad-2');
cy.visit('/graphs');
cy.waitForSkeletonGone();
cy.get('.small-buttons > :nth-child(2)').should('be.visible');
cy.get('#dropdownFees').should('be.visible');
cy.get('.btn-group').should('be.visible');
});
it('check buttons - desktop', () => {
cy.viewport('macbook-16');
cy.visit('/graphs');
cy.waitForSkeletonGone();
cy.get('.small-buttons > :nth-child(2)').should('be.visible');
cy.get('#dropdownFees').should('be.visible');
cy.get('.btn-group').should('be.visible');
});
});
it('loads the tv screen - desktop', () => {
cy.viewport('macbook-16');
cy.visit('/');
cy.waitForSkeletonGone();
cy.get('li:nth-of-type(4) > a').click().then(() => {
cy.viewport('macbook-16');
cy.get('.chart-holder');
cy.get('.blockchain-wrapper').should('be.visible');
cy.get('#mempool-block-0').should('be.visible');
});
});
it('loads the tv screen - mobile', () => {
cy.viewport('iphone-6');
cy.visit('/tv');
cy.waitForSkeletonGone();
cy.get('.chart-holder');
cy.get('.blockchain-wrapper').should('not.visible');
});
it('loads the api screen', () => {
cy.visit('/');
cy.waitForSkeletonGone();
cy.get('li:nth-of-type(5) > a').click().then(() => {
cy.wait(1000);
});
});
describe('blocks', () => {
it('shows empty blocks properly', () => {
cy.visit('/block/0000000000000000000bd14f744ef2e006e61c32214670de7eb891a5732ee775');
cy.waitForSkeletonGone();
cy.waitForPageIdle();
cy.get('h2').invoke('text').should('equal', '1 transaction');
});
it('expands and collapses the block details', () => {
cy.visit('/block/0');
cy.waitForSkeletonGone();
cy.waitForPageIdle();
cy.get('.btn.btn-outline-info').click().then(() => {
cy.get('#details').should('be.visible');
});
cy.get('.btn.btn-outline-info').click().then(() => {
cy.get('#details').should('not.be.visible');
});
});
it('shows blocks with no pagination', () => {
cy.visit('/block/00000000000000000001ba40caf1ad4cec0ceb77692662315c151953bfd7c4c4');
cy.waitForSkeletonGone();
cy.waitForPageIdle();
cy.get('.block-tx-title h2').invoke('text').should('equal', '19 transactions');
cy.get('.pagination-container ul.pagination').first().children().should('have.length', 5);
});
it('supports pagination on the block screen', () => {
// 41 txs
cy.visit('/block/00000000000000000009f9b7b0f63ad50053ad12ec3b7f5ca951332f134f83d8');
cy.waitForSkeletonGone();
cy.get('.pagination-container a').invoke('text').then((text1) => {
cy.get('.active + li').first().click().then(() => {
cy.waitForSkeletonGone();
cy.waitForPageIdle();
cy.get('.header-bg.box > a').invoke('text').then((text2) => {
expect(text1).not.to.eq(text2);
});
});
});
});
it('shows blocks pagination with 5 pages (desktop)', () => {
cy.viewport(760, 800);
cy.visit('/block/000000000000000000049281946d26fcba7d99fdabc1feac524bc3a7003d69b3').then(() => {
cy.waitForSkeletonGone();
cy.waitForPageIdle();
});
// 5 pages + 4 buttons = 9 buttons
cy.get('.pagination-container ul.pagination').first().children().should('have.length', 9);
});
it('shows blocks pagination with 3 pages (mobile)', () => {
cy.viewport(669, 800);
cy.visit('/block/000000000000000000049281946d26fcba7d99fdabc1feac524bc3a7003d69b3').then(() => {
cy.waitForSkeletonGone();
cy.waitForPageIdle();
});
// 3 pages + 4 buttons = 7 buttons
cy.get('.pagination-container ul.pagination').first().children().should('have.length', 7);
});
});
} else {
it.skip(`Tests cannot be run on the selected BASE_MODULE ${baseModule}`);
}
});

View File

@@ -1,10 +1,139 @@
import { emitMempoolInfo } from "../../support/websocket";
const baseModule = Cypress.env("BASE_MODULE");
describe('Signet', () => {
it('loads the dashboard', () => {
cy.visit('/signet');
});
it.skip('loads all the pages properly', () => {
});
beforeEach(() => {
cy.intercept('/api/block-height/*').as('block-height');
cy.intercept('/api/block/*').as('block');
cy.intercept('/api/block/*/txs/0').as('block-txs');
cy.intercept('/api/tx/*/outspends').as('tx-outspends');
});
if (baseModule === 'mempool') {
it('loads the dashboard', () => {
cy.visit('/signet');
cy.waitForSkeletonGone();
});
it('check first mempool block after skeleton loads', () => {
cy.visit('/');
cy.waitForSkeletonGone();
cy.get('#mempool-block-0 > .blockLink').should('exist');
});
it.skip('loads the dashboard with the skeleton blocks', () => {
cy.mockMempoolSocket();
cy.visit("/signet");
cy.get(':nth-child(1) > #bitcoin-block-0').should('be.visible');
cy.get(':nth-child(2) > #bitcoin-block-0').should('be.visible');
cy.get(':nth-child(3) > #bitcoin-block-0').should('be.visible');
cy.get('#mempool-block-0').should('be.visible');
cy.get('#mempool-block-1').should('be.visible');
cy.get('#mempool-block-2').should('be.visible');
emitMempoolInfo({
'params': {
"network": "signet"
}
});
cy.get(':nth-child(1) > #bitcoin-block-0').should('not.exist');
cy.get(':nth-child(2) > #bitcoin-block-0').should('not.exist');
cy.get(':nth-child(3) > #bitcoin-block-0').should('not.exist');
});
it('loads the blocks screen', () => {
cy.visit('/signet');
cy.waitForSkeletonGone();
cy.get('li:nth-of-type(2) > a').click().then(() => {
cy.wait(1000);
});
});
it('loads the graphs screen', () => {
cy.visit('/signet');
cy.waitForSkeletonGone();
cy.get('li:nth-of-type(3) > a').click().then(() => {
cy.wait(1000);
});
});
describe('tv mode', () => {
it('loads the tv screen - desktop', () => {
cy.viewport('macbook-16');
cy.visit('/signet');
cy.waitForSkeletonGone();
cy.get('li:nth-of-type(4) > a').click().then(() => {
cy.get('.chart-holder').should('be.visible');
cy.get('#mempool-block-0').should('be.visible');
cy.get('.tv-only').should('not.exist');
});
});
it('loads the tv screen - mobile', () => {
cy.visit('/signet');
cy.waitForSkeletonGone();
cy.get('li:nth-of-type(4) > a').click().then(() => {
cy.viewport('iphone-8');
cy.get('.chart-holder').should('be.visible');
//TODO: Remove comment when the bug is fixed
//cy.get('#mempool-block-0').should('be.visible');
cy.get('.tv-only').should('not.exist');
});
});
});
it('loads the api screen', () => {
cy.visit('/signet');
cy.waitForSkeletonGone();
cy.get('li:nth-of-type(5) > a').click().then(() => {
cy.wait(1000);
});
});
describe('blocks', () => {
it('shows empty blocks properly', () => {
cy.visit('/signet/block/00000133d54e4589f6436703b067ec23209e0a21b8a9b12f57d0592fd85f7a42');
cy.waitForSkeletonGone();
cy.get('h2').invoke('text').should('equal', '1 transaction');
});
it('expands and collapses the block details', () => {
cy.visit('/signet/block/0');
cy.waitForSkeletonGone();
cy.get('.btn.btn-outline-info').click().then(() => {
cy.get('#details').should('be.visible');
});
cy.get('.btn.btn-outline-info').click().then(() => {
cy.get('#details').should('not.be.visible');
});
});
it('shows blocks with no pagination', () => {
cy.visit('/signet/block/00000078f920a96a69089877b934ce7fd009ab55e3170920a021262cb258e7cc');
cy.waitForSkeletonGone();
cy.get('h2').invoke('text').should('equal', '13 transactions');
cy.get('ul.pagination').first().children().should('have.length', 5);
});
it('supports pagination on the block screen', () => {
// 43 txs
cy.visit('/signet/block/00000094bd52f73bdbfc4bece3a94c21fec2dc968cd54210496e69e4059d66a6');
cy.waitForSkeletonGone();
cy.get('.header-bg.box > a').invoke('text').then((text1) => {
cy.get('.active + li').first().click().then(() => {
cy.get('.header-bg.box > a').invoke('text').then((text2) => {
expect(text1).not.to.eq(text2);
});
});
});
});
});
} else {
it.skip(`Tests cannot be run on the selected BASE_MODULE ${baseModule}`);
}
});

View File

@@ -1,9 +1,136 @@
import { confirmAddress, emitMempoolInfo, sendWsMock, showNewTx, startTrackingAddress } from "../../support/websocket";
const baseModule = Cypress.env("BASE_MODULE");
describe('Testnet', () => {
it('loads the dashboard', () => {
cy.visit('/testnet');
});
it.skip('loads all the pages properly', () => {
});
beforeEach(() => {
cy.intercept('/api/block-height/*').as('block-height');
cy.intercept('/api/block/*').as('block');
cy.intercept('/api/block/*/txs/0').as('block-txs');
cy.intercept('/api/tx/*/outspends').as('tx-outspends');
});
if (baseModule === 'mempool') {
it('loads the dashboard', () => {
cy.visit('/testnet');
cy.waitForSkeletonGone();
});
it('check first mempool block after skeleton loads', () => {
cy.visit('/');
cy.waitForSkeletonGone();
cy.get('#mempool-block-0 > .blockLink').should('exist');
});
it.skip('loads the dashboard with the skeleton blocks', () => {
cy.mockMempoolSocket();
cy.visit("/testnet");
cy.get(':nth-child(1) > #bitcoin-block-0').should('be.visible');
cy.get(':nth-child(2) > #bitcoin-block-0').should('be.visible');
cy.get(':nth-child(3) > #bitcoin-block-0').should('be.visible');
cy.get('#mempool-block-0').should('be.visible');
cy.get('#mempool-block-1').should('be.visible');
cy.get('#mempool-block-2').should('be.visible');
emitMempoolInfo({
'params': {
loaded: true
}
});
cy.get(':nth-child(1) > #bitcoin-block-0').should('not.exist');
cy.get(':nth-child(2) > #bitcoin-block-0').should('not.exist');
cy.get(':nth-child(3) > #bitcoin-block-0').should('not.exist');
});
it('loads the blocks screen', () => {
cy.visit('/testnet');
cy.waitForSkeletonGone();
cy.get('li:nth-of-type(2) > a').click().then(() => {
cy.wait(1000);
});
});
it('loads the graphs screen', () => {
cy.visit('/testnet');
cy.waitForSkeletonGone();
cy.get('li:nth-of-type(3) > a').click().then(() => {
cy.wait(1000);
});
});
describe('tv mode', () => {
it('loads the tv screen - desktop', () => {
cy.viewport('macbook-16');
cy.visit('/testnet');
cy.waitForSkeletonGone();
cy.get('li:nth-of-type(4) > a').click().then(() => {
cy.wait(1000);
cy.get('.tv-only').should('not.exist');
});
});
it('loads the tv screen - mobile', () => {
cy.visit('/testnet');
cy.waitForSkeletonGone();
cy.get('li:nth-of-type(4) > a').click().then(() => {
cy.viewport('iphone-6');
cy.wait(1000);
cy.get('.tv-only').should('not.exist');
});
});
});
it('loads the api screen', () => {
cy.visit('/testnet');
cy.waitForSkeletonGone();
cy.get('li:nth-of-type(5) > a').click().then(() => {
cy.wait(1000);
});
});
describe('blocks', () => {
it('shows empty blocks properly', () => {
cy.visit('/testnet/block/0');
cy.waitForSkeletonGone();
cy.get('h2').invoke('text').should('equal', '1 transaction');
});
it('expands and collapses the block details', () => {
cy.visit('/testnet/block/0');
cy.waitForSkeletonGone();
cy.get('.btn.btn-outline-info').click().then(() => {
cy.get('#details').should('be.visible');
});
cy.get('.btn.btn-outline-info').click().then(() => {
cy.get('#details').should('not.be.visible');
});
});
it('shows blocks with no pagination', () => {
cy.visit('/testnet/block/000000000000002f8ce27716e74ecc7ad9f7b5101fed12d09e28bb721b9460ea');
cy.waitForSkeletonGone();
cy.get('h2').invoke('text').should('equal', '11 transactions');
cy.get('ul.pagination').first().children().should('have.length', 5);
});
it('supports pagination on the block screen', () => {
// 48 txs
cy.visit('/testnet/block/000000000000002ca3878ebd98b313a1c2d531f2e70a6575d232ca7564dea7a9');
cy.waitForSkeletonGone();
cy.get('.header-bg.box > a').invoke('text').then((text1) => {
cy.get('.active + li').first().click().then(() => {
cy.get('.header-bg.box > a').invoke('text').then((text2) => {
expect(text1).not.to.eq(text2);
});
});
});
});
});
} else {
it.skip(`Tests cannot be run on the selected BASE_MODULE ${baseModule}`);
}
});

View File

@@ -1 +1,13 @@
module.exports = (on, config) => {}
const fs = require('fs');
const CONFIG_FILE = 'mempool-frontend-config.json';
module.exports = (on, config) => {
if (fs.existsSync(CONFIG_FILE)) {
let contents = JSON.parse(fs.readFileSync(CONFIG_FILE, 'utf8'));
config.env.BASE_MODULE = contents.BASE_MODULE ? contents.BASE_MODULE : 'mempool';
} else {
config.env.BASE_MODULE = 'mempool';
}
return config;
}

View File

@@ -0,0 +1,63 @@
// source: chrisp_68 @ https://stackoverflow.com/questions/50525143/how-do-you-reliably-wait-for-page-idle-in-cypress-io-test
export class PageIdleDetector
{
defaultOptions: Object = { timeout: 60000 };
public WaitForPageToBeIdle(): void
{
this.WaitForPageToLoad();
this.WaitForAngularRequestsToComplete();
this.WaitForAngularDigestCycleToComplete();
this.WaitForAnimationsToStop();
}
public WaitForPageToLoad(options: Object = this.defaultOptions): void
{
cy.document(options).should((myDocument: any) =>
{
expect(myDocument.readyState, "WaitForPageToLoad").to.be.oneOf(["interactive", "complete"]);
});
}
public WaitForAngularRequestsToComplete(options: Object = this.defaultOptions): void
{
cy.window(options).should((myWindow: any) =>
{
if (!!myWindow.angular)
{
expect(this.NumberOfPendingAngularRequests(myWindow), "WaitForAngularRequestsToComplete").to.have.length(0);
}
});
}
public WaitForAngularDigestCycleToComplete(options: Object = this.defaultOptions): void
{
cy.window(options).should((myWindow: any) =>
{
if (!!myWindow.angular)
{
expect(this.AngularRootScopePhase(myWindow), "WaitForAngularDigestCycleToComplete").to.be.null;
}
});
}
public WaitForAnimationsToStop(options: Object = this.defaultOptions): void
{
cy.get(":animated", options).should("not.exist");
}
private getInjector(myWindow: any)
{
return myWindow.angular.element(myWindow.document.body).injector();
}
private NumberOfPendingAngularRequests(myWindow: any)
{
return this.getInjector(myWindow).get('$http').pendingRequests;
}
private AngularRootScopePhase(myWindow: any)
{
return this.getInjector(myWindow).get("$rootScope").$$phase;
}
}

View File

@@ -42,4 +42,106 @@
// -- This will overwrite an existing command --
// Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... })
'use strict'
import 'cypress-wait-until';
import { PageIdleDetector } from './PageIdleDetector';
import { mockWebSocket } from './websocket';
/* global Cypress */
const codes = {
ArrowLeft: 37,
ArrowUp: 38,
ArrowRight: 39,
ArrowDown: 40
}
Cypress.Commands.add('waitForSkeletonGone', () => {
cy.waitUntil(() => {
return Cypress.$('.skeleton-loader').length === 0;
}, { verbose: true, description: "waitForSkeletonGone", errorMsg: "skeleton loaders never went away", timeout: 15000, interval: 50});
});
Cypress.Commands.add(
"waitForPageIdle",
() => {
console.warn("Waiting for page idle state");
const pageIdleDetector = new PageIdleDetector();
pageIdleDetector.WaitForPageToBeIdle();
}
);
Cypress.Commands.add('mockMempoolSocket', () => {
mockWebSocket();
});
Cypress.Commands.add('changeNetwork', (network: "testnet"|"signet"|"liquid"|"bisq"|"mainnet" ) => {
cy.get('.dropdown-toggle').click().then(() => {
cy.get(`.${network}`).click().then(() => {
cy.waitForPageIdle();
if(network !== 'bisq'){
cy.waitForSkeletonGone();
}
});
});
});
// https://github.com/bahmutov/cypress-arrows/blob/8f0303842a343550fbeaf01528d01d1ff213b70c/src/index.js
function keydownCommand ($el, key) {
const message = `sending the "${key}" keydown event`
const log = Cypress.log({
name: `keydown: ${key}`,
message: message,
consoleProps: function () {
return {
Subject: $el
}
}
})
const e = $el.createEvent('KeyboardEvent')
Object.defineProperty(e, 'key', {
get: function () {
return key
}
})
Object.defineProperty(e, 'keyCode', {
get: function () {
return this.keyCodeVal
}
})
Object.defineProperty(e, 'which', {
get: function () {
return this.keyCodeVal
}
})
var metaKey = false
Object.defineProperty(e, 'metaKey', {
get: function () {
return metaKey
}
})
Object.defineProperty(e, 'shiftKey', {
get: function () {
return false
}
})
e.keyCodeVal = codes[key]
e.initKeyboardEvent('keydown', true, true,
$el.defaultView, false, false, false, false, e.keyCodeVal, e.keyCodeVal)
$el.dispatchEvent(e)
log.snapshot().end()
return $el
}
Cypress.Commands.add('keydown', { prevSubject: "dom" }, keydownCommand)
Cypress.Commands.add('left', { prevSubject: "dom" }, $el => keydownCommand($el, 'ArrowLeft'))
Cypress.Commands.add('right', { prevSubject: "dom" }, $el => keydownCommand($el, 'ArrowRight'))
Cypress.Commands.add('up', { prevSubject: "dom" }, $el => keydownCommand($el, 'ArrowUp'))
Cypress.Commands.add('down', { prevSubject: "dom" }, $el => keydownCommand($el, 'ArrowDown'))

10
frontend/cypress/support/index.d.ts vendored Normal file
View File

@@ -0,0 +1,10 @@
/// <reference types="cypress" />
declare namespace Cypress {
interface Chainable<Subject> {
waitForSkeletonGone(): Chainable<any>
waitForPageIdle(): Chainable<any>
mockMempoolSocket(): Chainable<any>
changeNetwork(network: "testnet"|"signet"|"liquid"|"bisq"|"mainnet"): Chainable<any>
}
}

View File

@@ -15,3 +15,6 @@
// When a command from ./commands is ready to use, import with `import './commands'` syntax
import './commands';
import failOnConsoleError from 'cypress-fail-on-console-error';
failOnConsoleError();

View File

@@ -0,0 +1,92 @@
import { v4 as uuid } from 'uuid';
import { WebSocket, Server } from 'mock-socket';
declare global {
interface Window {
mockServer: Server;
mockSocket: WebSocket;
}
}
const mocks: { [key: string]: { server: Server; websocket: WebSocket } } = {};
const cleanupMock = (url: string) => {
if (mocks[url]) {
mocks[url].websocket.close();
mocks[url].server.stop();
delete mocks[url];
}
};
const createMock = (url: string) => {
cleanupMock(url);
const server = new Server(url);
const websocket = new WebSocket(url);
mocks[url] = { server, websocket };
return mocks[url];
};
export const mockWebSocket = () => {
cy.on('window:before:load', (win) => {
const winWebSocket = win.WebSocket;
cy.stub(win, 'WebSocket').callsFake((url) => {
console.log(url);
if ((new URL(url).pathname.indexOf('/sockjs-node/') !== 0)) {
const { server, websocket } = createMock(url);
win.mockServer = server;
win.mockServer.on('connection', (socket) => {
win.mockSocket = socket;
win.mockSocket.send('{"action":"init"}');
});
win.mockServer.on('message', (message) => {
console.log(message);
});
return websocket;
} else {
return new winWebSocket(url);
}
});
});
cy.on('window:before:unload', () => {
for (const url in mocks) {
cleanupMock(url);
}
});
};
export const emitMempoolInfo = ({
params
}: { params?: any } = {}) => {
cy.window().then((win) => {
//TODO: Refactor to take into account different parameterized mocking scenarios
switch (params.network) {
//TODO: Use network specific mocks
case "signet":
case "testnet":
default:
win.mockSocket.send('{"action":"init"}');
win.mockSocket.send('{"action":"want","data":["blocks","stats","mempool-blocks","live-2h-chart"]}');
win.mockSocket.send('{"conversions":{"USD":32365.338815782445}}');
cy.readFile('cypress/fixtures/mainnet_live2hchart.json', 'ascii').then((fixture) => {
win.mockSocket.send(JSON.stringify(fixture));
});
cy.readFile('cypress/fixtures/mainnet_mempoolInfo.json', 'ascii').then((fixture) => {
win.mockSocket.send(JSON.stringify(fixture));
});
}
});
cy.waitForSkeletonGone();
return cy.get('#mempool-block-0');
};
export const dropWebSocket = (() => {
cy.window().then((win) => {
win.mockServer.simulate("error");
});
return cy.wait(500);
});

View File

@@ -2,7 +2,9 @@
"extends": "../tsconfig.json",
"include": ["**/*.ts"],
"compilerOptions": {
"sourceMap": false,
"types": ["cypress"]
"types": ["cypress"],
"lib": ["es2015", "dom"],
"allowJs": true,
"noEmit": true,
}
}

View File

@@ -21,6 +21,16 @@ try {
}
}
const indexFilePath = configContent.BASE_MODULE ? 'src/index.' + configContent.BASE_MODULE + '.html' : 'src/index.mempool.html';
try {
fs.copyFileSync(indexFilePath, 'src/index.html');
console.log('Copied ' + indexFilePath + ' to src/index.html');
} catch (e) {
console.log('Error copying the index file');
throw new Error(e);
}
try {
const packageJson = fs.readFileSync('package.json');
packetJsonVersion = JSON.parse(packageJson).version;

View File

@@ -8,5 +8,8 @@
"KEEP_BLOCKS_AMOUNT": 8,
"NGINX_PROTOCOL": "http",
"NGINX_HOSTNAME": "127.0.0.1",
"NGINX_PORT": "80"
"NGINX_PORT": "80",
"MEMPOOL_BLOCKS_AMOUNT": 8,
"BLOCK_WEIGHT_UNITS": 4000000,
"BASE_MODULE": "mempool"
}

27260
frontend/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
{
"name": "mempool-frontend",
"version": "2.2.0",
"version": "2.3.0-dev",
"description": "Bitcoin mempool visualizer and blockchain explorer backend",
"license": "GNU Affero General Public License v3.0",
"homepage": "https://mempool.space",
@@ -22,7 +22,7 @@
"scripts": {
"ng": "./node_modules/@angular/cli/bin/ng",
"tsc": "./node_modules/typescript/bin/tsc",
"i18n-extract-from-source": "./node_modules/@angular/cli/bin/ng xi18n --ivy --out-file ./src/locale/messages.xlf",
"i18n-extract-from-source": "./node_modules/@angular/cli/bin/ng extract-i18n --out-file ./src/locale/messages.xlf",
"i18n-pull-from-transifex": "tx pull -a --parallel --minimum-perc 1 --force",
"serve": "npm run generate-config && ng serve -c local",
"serve:stg": "npm run generate-config && ng serve -c staging",
@@ -30,50 +30,61 @@
"start": "npm run generate-config && npm run sync-assets-dev && ng serve -c local",
"start:stg": "npm run generate-config && npm run sync-assets-dev && ng serve -c staging",
"start:local-prod": "npm run generate-config && npm run sync-assets-dev && ng serve -c local-prod",
"build": "npm run generate-config && ng build --prod --localize && npm run sync-assets && npm run build-mempool.js",
"build": "npm run generate-config && ng build --configuration production --localize && npm run sync-assets && npm run build-mempool.js",
"sync-assets": "node sync-assets.js && rsync -av ./dist/mempool/browser/en-US/resources ./dist/mempool/browser/resources",
"sync-assets-dev": "node sync-assets.js dev",
"generate-config": "node generate-config.js",
"build-mempool.js": "tsc | browserify -p tinyify ./node_modules/@mempool/mempool.js/lib/index.js --standalone mempoolJS > ./dist/mempool/browser/en-US/mempool.js",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
"e2e": "npm run generate-config && ng e2e",
"e2e:ci": "npm run cypress:run:ci",
"config:defaults:mempool": "node update-config.js TESTNET_ENABLED=true SIGNET_ENABLED=true LIQUID_ENABLED=true BISQ_ENABLED=true ITEMS_PER_PAGE=25 BASE_MODULE=mempool && npm run generate-config",
"config:defaults:liquid": "node update-config.js TESTNET_ENABLED=true SIGNET_ENABLED=true LIQUID_ENABLED=true BISQ_ENABLED=true ITEMS_PER_PAGE=25 BASE_MODULE=liquid && npm run generate-config",
"config:defaults:bisq": "node update-config.js TESTNET_ENABLED=true SIGNET_ENABLED=true LIQUID_ENABLED=true BISQ_ENABLED=true ITEMS_PER_PAGE=25 BASE_MODULE=bisq && npm run generate-config",
"dev:ssr": "npm run generate-config && ng run mempool:serve-ssr",
"serve:ssr": "node server.run.js",
"build:ssr": "npm run build && ng run mempool:server:production && ./node_modules/typescript/bin/tsc server.run.ts",
"prerender": "ng run mempool:prerender",
"cypress:open": "concurrently \"ng serve -c local-prod\" \"cypress open\" --kill-others",
"cypress:run": "concurrently \"ng serve -c local-prod\" \"cypress run\" --kill-others"
"cypress:open": "cypress open",
"cypress:run": "cypress run",
"cypress:run:record": "cypress run --record",
"cypress:open:ci": "node update-config.js TESTNET_ENABLED=true SIGNET_ENABLED=true LIQUID_ENABLED=true BISQ_ENABLED=true ITEMS_PER_PAGE=25 && npm run generate-config && start-server-and-test serve:local-prod 4200 cypress:open",
"cypress:run:ci": "node update-config.js TESTNET_ENABLED=true SIGNET_ENABLED=true LIQUID_ENABLED=true BISQ_ENABLED=true ITEMS_PER_PAGE=25 && npm run generate-config && start-server-and-test serve:local-prod 4200 cypress:run:record"
},
"dependencies": {
"@angular/animations": "~11.2.8",
"@angular/common": "~11.2.8",
"@angular/compiler": "~11.2.8",
"@angular/core": "~11.2.8",
"@angular/forms": "~11.2.8",
"@angular/localize": "^11.2.8",
"@angular/platform-browser": "~11.2.8",
"@angular/platform-browser-dynamic": "~11.2.8",
"@angular/platform-server": "~11.2.8",
"@angular/router": "~11.2.8",
"@angular-devkit/build-angular": "^13.0.4",
"@angular/animations": "~13.0.3",
"@angular/cli": "~13.0.4",
"@angular/common": "~13.0.3",
"@angular/compiler": "~13.0.3",
"@angular/core": "~13.0.3",
"@angular/forms": "~13.0.3",
"@angular/localize": "^13.0.3",
"@angular/platform-browser": "~13.0.3",
"@angular/platform-browser-dynamic": "~13.0.3",
"@angular/platform-server": "~13.0.3",
"@angular/router": "~13.0.3",
"@fortawesome/angular-fontawesome": "^0.8.2",
"@fortawesome/fontawesome-common-types": "^0.2.35",
"@fortawesome/fontawesome-svg-core": "^1.2.35",
"@fortawesome/free-solid-svg-icons": "^5.15.3",
"@mempool/chartist": "^0.11.4",
"@mempool/mempool.js": "^2.2.2",
"@ng-bootstrap/ng-bootstrap": "^7.0.0",
"@juggle/resize-observer": "^3.3.1",
"@mempool/mempool.js": "^2.2.4",
"@ng-bootstrap/ng-bootstrap": "^10.0.0",
"@nguniversal/express-engine": "11.2.1",
"@types/qrcode": "^1.3.4",
"@types/qrcode": "1.4.1",
"bootstrap": "4.5.0",
"browserify": "^17.0.0",
"clipboard": "^2.0.4",
"domino": "^2.1.6",
"echarts": "^5.1.2",
"express": "^4.17.1",
"lightweight-charts": "^3.3.0",
"ngx-bootrap-multiselect": "^2.0.0",
"ngx-echarts": "^7.0.1",
"ngx-infinite-scroll": "^10.0.1",
"qrcode": "^1.4.4",
"qrcode": "1.5.0",
"rxjs": "^6.6.7",
"tinyify": "^3.0.0",
"tlite": "^0.1.9",
@@ -81,32 +92,32 @@
"zone.js": "~0.11.4"
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.1102.7",
"@angular/cli": "~11.2.7",
"@angular/compiler-cli": "~11.2.8",
"@angular/language-service": "~11.2.8",
"@cypress/schematic": "^1.3.0",
"@angular/compiler-cli": "~13.0.3",
"@angular/language-service": "~13.0.3",
"@nguniversal/builders": "^11.2.1",
"@types/express": "^4.17.0",
"@types/jasmine": "~3.6.0",
"@types/jasminewd2": "~2.0.3",
"@types/node": "^12.11.1",
"codelyzer": "^6.0.1",
"concurrently": "^6.2.0",
"cypress-wait-until": "^1.7.1",
"http-proxy-middleware": "^1.0.5",
"jasmine-core": "~3.6.0",
"jasmine-spec-reporter": "~5.0.0",
"karma": "~6.1.0",
"karma": "~6.3.4",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage": "~2.0.3",
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "^1.5.0",
"ts-node": "~8.3.0",
"tslint": "~6.1.0",
"typescript": "~4.1.5"
"typescript": "~4.4.4"
},
"optionalDependencies": {
"cypress": "^7.4.0"
"@cypress/schematic": "^1.3.0",
"cypress": "^9.1.1",
"cypress-fail-on-console-error": "^2.1.3",
"cypress-wait-until": "^1.7.1",
"mock-socket": "^9.0.3",
"start-server-and-test": "^1.12.6"
}
}
}

79
frontend/proxy.conf.js Normal file
View File

@@ -0,0 +1,79 @@
const fs = require('fs');
let PROXY_CONFIG;
let configContent;
const CONFIG_FILE_NAME = 'mempool-frontend-config.json';
try {
const rawConfig = fs.readFileSync(CONFIG_FILE_NAME);
configContent = JSON.parse(rawConfig);
console.log(`${CONFIG_FILE_NAME} file found, using provided config`);
} catch (e) {
console.log(e);
if (e.code !== 'ENOENT') {
throw new Error(e);
} else {
console.log(`${CONFIG_FILE_NAME} file not found, using default config`);
}
}
PROXY_CONFIG = [
{
context: ['*',
'/api/**', '!/api/v1/ws',
'!/bisq', '!/bisq/**', '!/bisq/',
'!/liquid', '!/liquid/**', '!/liquid/',
'/testnet/api/**', '/signet/api/**'
],
target: "https://mempool.space",
ws: true,
secure: false,
changeOrigin: true
},
{
context: ['/api/v1/ws'],
target: "https://mempool.space",
ws: true,
secure: false,
changeOrigin: true,
},
{
context: ['/api/bisq**', '/bisq/api/**'],
target: "https://bisq.markets",
pathRewrite: {
"^/api/bisq/": "/bisq/api"
},
ws: true,
secure: false,
changeOrigin: true
},
{
context: ['/api/liquid**', '/liquid/api/**'],
target: "https://liquid.network",
pathRewrite: {
"^/api/liquid/": "/liquid/api"
},
ws: true,
secure: false,
changeOrigin: true
}
];
if (configContent && configContent.BASE_MODULE == "liquid") {
PROXY_CONFIG.push({
context: ['/resources/pools.json', '/resources/assets.json', '/resources/assets.minimal.json'],
target: "https://liquid.network",
secure: false,
changeOrigin: true,
});
} else {
PROXY_CONFIG.push({
context: ['/resources/pools.json', '/resources/assets.json', '/resources/assets.minimal.json'],
target: "https://mempool.space",
secure: false,
changeOrigin: true,
});
}
module.exports = PROXY_CONFIG;

View File

@@ -1,107 +0,0 @@
{
"/api/v1": {
"target": "http://localhost:8999/",
"secure": false
},
"/api/v1/ws": {
"target": "http://localhost:8999/",
"secure": false,
"ws": true
},
"/api/": {
"target": "http://localhost:8999/",
"secure": false,
"pathRewrite": {
"^/api/": "/api/v1/"
}
},
"/testnet/api/v1": {
"target": "http://localhost:8999/",
"secure": false,
"pathRewrite": {
"^/testnet/api/v1": "/api/v1"
}
},
"/testnet/api/v1/ws": {
"target": "http://localhost:8999/",
"secure": false,
"ws": true,
"pathRewrite": {
"^/testnet/api": "/api/v1/ws"
}
},
"/testnet/api/": {
"target": "http://localhost:50001/",
"secure": false,
"pathRewrite": {
"^/testnet/api": ""
}
},
"/signet/api/v1": {
"target": "http://localhost:8999/",
"secure": false,
"pathRewrite": {
"^/signet/api/v1": "/api/v1"
}
},
"/signet/api/v1/ws": {
"target": "http://localhost:8999/",
"secure": false,
"ws": true,
"pathRewrite": {
"^/signet/api": "/api/v1/ws"
}
},
"/signet/api/": {
"target": "http://localhost:50001/",
"secure": false,
"pathRewrite": {
"^/signet/api": ""
}
},
"/liquid/api/v1/ws": {
"target": "http://localhost:8999/",
"secure": false,
"ws": true,
"pathRewrite": {
"^/liquid/api": "/api/v1/ws"
}
},
"/liquid/api/": {
"target": "http://localhost:50001/",
"secure": false,
"pathRewrite": {
"^/liquid/api/": ""
}
},
"/bisq/api/": {
"target": "http://localhost:8999/",
"secure": false,
"pathRewrite": {
"^/bisq/api/": "/api/v1/bisq/"
}
},
"/bisq/api/v1/ws": {
"target": "http://localhost:8999/",
"secure": false,
"ws": true,
"pathRewrite": {
"^/bisq/api": "/api/v1/ws"
}
},
"/resources/assets.minimal.json": {
"target": "https://mempool.space",
"secure": false,
"changeOrigin": true
},
"/resources/assets.json": {
"target": "https://mempool.space",
"secure": false,
"changeOrigin": true
},
"/resources/pools.json": {
"target": "https://mempool.space",
"secure": false,
"changeOrigin": true
}
}

View File

@@ -0,0 +1,73 @@
const fs = require('fs');
let PROXY_CONFIG = require('./proxy.conf.js');
const BACKEND_CONFIG_FILE_NAME = '../backend/mempool-config.json';
const FRONTEND_CONFIG_FILE_NAME = 'mempool-frontend-config.json';
let backendConfigContent;
let frontendConfigContent;
// Read frontend config
try {
const rawConfig = fs.readFileSync(FRONTEND_CONFIG_FILE_NAME);
frontendConfigContent = JSON.parse(rawConfig);
console.log(`${FRONTEND_CONFIG_FILE_NAME} file found, using provided config`);
} catch (e) {
console.log(e);
if (e.code !== 'ENOENT') {
throw new Error(e);
} else {
console.log(`${FRONTEND_CONFIG_FILE_NAME} file not found, using default config`);
}
}
// Read backend config
try {
const rawConfig = fs.readFileSync(BACKEND_CONFIG_FILE_NAME);
backendConfigContent = JSON.parse(rawConfig);
console.log(`${BACKEND_CONFIG_FILE_NAME} file found, using provided config`);
} catch (e) {
console.log(e);
if (e.code !== 'ENOENT') {
throw new Error(e);
} else {
console.log(`${BACKEND_CONFIG_FILE_NAME} file not found, using default config`);
}
}
// Remove the "/api/**" entry from the default proxy config
let localDevContext = PROXY_CONFIG[0].context
localDevContext.splice(PROXY_CONFIG[0].context.indexOf('/api/**'), 1);
PROXY_CONFIG[0].context = localDevContext;
// Change all targets to localhost
PROXY_CONFIG.map(conf => conf.target = "http://localhost:8999");
// Add rules for local backend
if (backendConfigContent) {
PROXY_CONFIG.push({
context: ['/api/address/**', '/api/tx/**', '/api/block/**', '/api/blocks/**'],
target: `http://localhost:8999`,
secure: false,
changeOrigin: true,
proxyTimeout: 30000,
pathRewrite: {
"^/api/": "/api/v1/"
},
});
PROXY_CONFIG.push({
context: ['/api/v1/**'],
target: `http://localhost:8999`,
secure: false,
changeOrigin: true,
proxyTimeout: 30000
});
}
console.log(PROXY_CONFIG);
module.exports = PROXY_CONFIG;

View File

@@ -1,102 +0,0 @@
{
"/api/v1/ws": {
"target": "https://mempool.space",
"secure": false,
"ws": true
},
"/api/*": {
"target": "https://mempool.space",
"secure": false,
"changeOrigin": true,
"logLevel": "debug",
"pathRewrite": {
"^/api": "https://mempool.space/api"
},
"timeout": 3600000
},
"/testnet/api/v1/ws": {
"target": "https://mempool.space/testnet",
"secure": false,
"ws": true,
"loglevel": "debug",
"pathRewrite": {
"^/testnet/api": "/api/v1/ws"
}
},
"/testnet/api/*": {
"target": "https://mempool.space",
"secure": true,
"changeOrigin": true,
"loglevel": "debug",
"pathRewrite": {
"/testnet/api": "/testnet/api"
},
"timeout": 3600000
},
"/signet/api/v1/ws": {
"target": "https://mempool.space/signet",
"secure": false,
"ws": true,
"loglevel": "debug",
"pathRewrite": {
"^/signet/api": "/api/v1/ws"
}
},
"/signet/api/*": {
"target": "https://mempool.space",
"secure": true,
"changeOrigin": true,
"loglevel": "debug",
"pathRewrite": {
"/signet/api": "/signet/api"
},
"timeout": 3600000
},
"/bisq/api/v1/ws": {
"target": "https://mempool.space/bisq",
"secure": false,
"ws": true,
"pathRewrite": {
"^/bisq/api": "/api/v1/ws"
}
},
"/bisq/api/*": {
"target": "https://mempool.space/bisq",
"secure": false,
"changeOrigin": true,
"pathRewrite": {
"^/bisq/api/": "/api/v1/bisq/"
},
"timeout": 3600000
},
"/liquid/api/v1/ws": {
"target": "https://mempool.space",
"secure": false,
"ws": true
},
"/liquid/api/*": {
"target": "https://mempool.space",
"secure": false,
"changeOrigin": true,
"pathRewrite": {
"^/liquid/api/": "/liquid/api/"
},
"timeout": 3600000
},
"/resources/assets.minimal.json": {
"target": "https://mempool.space",
"secure": false,
"changeOrigin": true
},
"/resources/assets.json": {
"target": "https://mempool.space",
"secure": false,
"changeOrigin": true
},
"/resources/pools.json": {
"target": "https://mempool.space",
"secure": false,
"changeOrigin": true
}
}

View File

@@ -1,100 +0,0 @@
{
"/api/v1/ws": {
"target": "https://mempool.ninja",
"secure": false,
"ws": true
},
"/api/*": {
"target": "https://mempool.ninja",
"secure": false,
"changeOrigin": true,
"logLevel": "debug",
"pathRewrite": {
"^/api": "https://mempool.ninja/api"
},
"timeout": 3600000
},
"/testnet/api/v1/ws": {
"target": "https://mempool.ninja/testnet",
"secure": false,
"ws": true,
"pathRewrite": {
"^/testnet/api": "/api/v1/ws"
}
},
"/testnet/api/v1/*": {
"target": "https://mempool.ninja/testnet",
"secure": false,
"changeOrigin": true,
"pathRewrite": {
"^/testnet/api/v1": "/api/v1"
},
"timeout": 3600000
},
"/signet/api/v1/ws": {
"target": "https://mempool.ninja/signet",
"secure": false,
"ws": true,
"pathRewrite": {
"^/signet/api": "/api/v1/ws"
}
},
"/signet/api/v1/*": {
"target": "https://mempool.ninja/signet",
"secure": false,
"changeOrigin": true,
"pathRewrite": {
"^/signet/api/v1": "/api/v1"
},
"timeout": 3600000
},
"/bisq/api/v1/ws": {
"target": "https://mempool.ninja/bisq",
"secure": false,
"ws": true,
"pathRewrite": {
"^/bisq/api": "/api/v1/ws"
}
},
"/bisq/api/*": {
"target": "https://mempool.ninja/bisq",
"secure": false,
"changeOrigin": true,
"pathRewrite": {
"^/bisq/api/": "/api/v1/bisq/"
},
"timeout": 3600000
},
"/liquid/api/v1/ws": {
"target": "https://mempool.ninja/liquid",
"secure": false,
"ws": true,
"pathRewrite": {
"^/liquid/api": "/api/v1/ws"
}
},
"/liquid/api/*": {
"target": "https://mempool.ninja/liquid",
"secure": false,
"changeOrigin": true,
"pathRewrite": {
"^/liquid/api/": "/api/v1/liquid/"
},
"timeout": 3600000
},
"/resources/assets.minimal.json": {
"target": "https://mempool.space",
"secure": false,
"changeOrigin": true
},
"/resources/assets.json": {
"target": "https://mempool.space",
"secure": false,
"changeOrigin": true
},
"/resources/pools.json": {
"target": "https://mempool.space",
"secure": false,
"changeOrigin": true
}
}

View File

@@ -1,4 +1,4 @@
import 'zone.js/dist/zone-node';
import 'zone.js/node';
import './generated-config';
import * as domino from 'domino';

View File

@@ -1,4 +1,4 @@
import 'zone.js/dist/zone-node';
import 'zone.js/node';
import './generated-config';
import { ngExpressEngine } from '@nguniversal/express-engine';

View File

@@ -16,14 +16,22 @@ import { DashboardComponent } from './dashboard/dashboard.component';
import { LatestBlocksComponent } from './components/latest-blocks/latest-blocks.component';
import { ApiDocsComponent } from './components/api-docs/api-docs.component';
import { TermsOfServiceComponent } from './components/terms-of-service/terms-of-service.component';
import { PrivacyPolicyComponent } from './components/privacy-policy/privacy-policy.component';
import { TrademarkPolicyComponent } from './components/trademark-policy/trademark-policy.component';
import { BisqMasterPageComponent } from './components/bisq-master-page/bisq-master-page.component';
import { SponsorComponent } from './components/sponsor/sponsor.component';
import { LiquidMasterPageComponent } from './components/liquid-master-page/liquid-master-page.component';
import { PushTransactionComponent } from './components/push-transaction/push-transaction.component';
let routes: Routes = [
{
path: '',
component: MasterPageComponent,
children: [
{
path: 'tx/push',
component: PushTransactionComponent,
},
{
path: '',
component: StartComponent,
@@ -66,6 +74,14 @@ let routes: Routes = [
path: 'terms-of-service',
component: TermsOfServiceComponent
},
{
path: 'privacy-policy',
component: PrivacyPolicyComponent
},
{
path: 'trademark-policy',
component: TrademarkPolicyComponent
},
{
path: 'address/:id',
children: [],
@@ -84,6 +100,10 @@ let routes: Routes = [
path: '',
component: MasterPageComponent,
children: [
{
path: 'tx/push',
component: PushTransactionComponent,
},
{
path: '',
component: StartComponent,
@@ -153,6 +173,10 @@ let routes: Routes = [
path: '',
component: MasterPageComponent,
children: [
{
path: 'tx/push',
component: PushTransactionComponent,
},
{
path: '',
component: StartComponent,
@@ -215,6 +239,10 @@ let routes: Routes = [
path: '',
component: MasterPageComponent,
children: [
{
path: 'tx/push',
component: PushTransactionComponent,
},
{
path: '',
component: StartComponent,
@@ -293,7 +321,7 @@ const browserWindow = window || {};
// @ts-ignore
const browserWindowEnv = browserWindow.__env || {};
if (browserWindowEnv && browserWindowEnv.OFFICIAL_BISQ_MARKETS) {
if (browserWindowEnv && browserWindowEnv.BASE_MODULE === 'bisq') {
routes = [{
path: '',
component: BisqMasterPageComponent,
@@ -301,6 +329,97 @@ if (browserWindowEnv && browserWindowEnv.OFFICIAL_BISQ_MARKETS) {
}];
}
if (browserWindowEnv && browserWindowEnv.BASE_MODULE === 'liquid') {
routes = [{
path: '',
component: LiquidMasterPageComponent,
children: [
{
path: '',
component: StartComponent,
children: [
{
path: '',
component: DashboardComponent
},
{
path: 'tx/push',
component: PushTransactionComponent,
},
{
path: 'tx/:id',
component: TransactionComponent
},
{
path: 'block/:id',
component: BlockComponent
},
{
path: 'mempool-block/:id',
component: MempoolBlockComponent
},
],
},
{
path: 'blocks',
component: LatestBlocksComponent,
},
{
path: 'graphs',
component: StatisticsComponent,
},
{
path: 'address/:id',
component: AddressComponent
},
{
path: 'asset/:id',
component: AssetComponent
},
{
path: 'assets',
component: AssetsComponent,
},
{
path: 'api',
component: ApiDocsComponent,
},
{
path: 'about',
component: AboutComponent,
},
{
path: 'terms-of-service',
component: TermsOfServiceComponent
},
{
path: 'privacy-policy',
component: PrivacyPolicyComponent
},
{
path: 'trademark-policy',
component: TrademarkPolicyComponent
},
{
path: 'sponsor',
component: SponsorComponent,
},
],
},
{
path: 'tv',
component: TelevisionComponent
},
{
path: 'status',
component: StatusViewComponent
},
{
path: '**',
redirectTo: ''
}];
}
@NgModule({
imports: [RouterModule.forRoot(routes, {
initialNavigation: 'enabled',

View File

@@ -31,6 +31,46 @@ export const mempoolFeeColors = [
'b9254b',
];
export const chartColors = [
"#D81B60",
"#8E24AA",
"#5E35B1",
"#3949AB",
"#1E88E5",
"#039BE5",
"#00ACC1",
"#00897B",
"#43A047",
"#7CB342",
"#C0CA33",
"#FDD835",
"#FFB300",
"#FB8C00",
"#F4511E",
"#6D4C41",
"#757575",
"#546E7A",
"#b71c1c",
"#880E4F",
"#4A148C",
"#311B92",
"#1A237E",
"#0D47A1",
"#01579B",
"#006064",
"#004D40",
"#1B5E20",
"#33691E",
"#827717",
"#F57F17",
"#FF6F00",
"#E65100",
"#BF360C",
"#3E2723",
"#212121",
"#263238",
];
export const feeLevels = [1, 2, 3, 4, 5, 6, 8, 10, 12, 15, 20, 30, 40, 50, 60, 70, 80, 90, 100, 125, 150, 175, 200,
250, 300, 350, 400, 500, 600, 700, 800, 900, 1000, 1200, 1400, 1600, 1800, 2000];
@@ -43,7 +83,7 @@ export const languages: Language[] = [
{ code: 'ar', name: 'العربية' }, // Arabic
// { code: 'bg', name: 'Български' }, // Bulgarian
// { code: 'bs', name: 'Bosanski' }, // Bosnian
// { code: 'ca', name: 'Català' }, // Catalan
{ code: 'ca', name: 'Català' }, // Catalan
{ code: 'cs', name: 'Čeština' }, // Czech
// { code: 'da', name: 'Dansk' }, // Danish
{ code: 'de', name: 'Deutsch' }, // German
@@ -59,13 +99,14 @@ export const languages: Language[] = [
{ code: 'ko', name: '한국어' }, // Korean
// { code: 'hr', name: 'Hrvatski' }, // Croatian
// { code: 'id', name: 'Bahasa Indonesia' },// Indonesian
{ code: 'hi', name: 'हिन्दी' }, // Hindi
{ code: 'it', name: 'Italiano' }, // Italian
{ code: 'he', name: 'עברית' }, // Hebrew
{ code: 'ka', name: 'ქართული' }, // Georgian
// { code: 'lv', name: 'Latviešu' }, // Latvian
// { code: 'lt', name: 'Lietuvių' }, // Lithuanian
{ code: 'hu', name: 'Magyar' }, // Hungarian
// { code: 'mk', name: 'Македонски' }, // Macedonian
{ code: 'mk', name: 'Македонски' }, // Macedonian
// { code: 'ms', name: 'Bahasa Melayu' }, // Malay
{ code: 'nl', name: 'Nederlands' }, // Dutch
{ code: 'ja', name: '日本語' }, // Japanese
@@ -74,7 +115,7 @@ export const languages: Language[] = [
{ code: 'pl', name: 'Polski' }, // Polish
{ code: 'pt', name: 'Português' }, // Portuguese
// { code: 'pt-BR', name: 'Português (Brazil)' }, // Portuguese (Brazil)
// { code: 'ro', name: 'Română' }, // Romanian
{ code: 'ro', name: 'Română' }, // Romanian
{ code: 'ru', name: 'Русский' }, // Russian
// { code: 'sk', name: 'Slovenčina' }, // Slovak
{ code: 'sl', name: 'Slovenščina' }, // Slovenian
@@ -82,9 +123,20 @@ export const languages: Language[] = [
// { code: 'sh', name: 'Srpskohrvatski / српскохрватски' },// Serbo-Croatian
{ code: 'fi', name: 'Suomi' }, // Finnish
{ code: 'sv', name: 'Svenska' }, // Swedish
// { code: 'th', name: 'ไทย' }, // Thai
{ code: 'th', name: 'ไทย' }, // Thai
{ code: 'tr', name: 'Türkçe' }, // Turkish
{ code: 'uk', name: 'Українська' }, // Ukrainian
{ code: 'vi', name: 'Tiếng Việt' }, // Vietnamese
{ code: 'zh', name: '中文' }, // Chinese
];
export const specialBlocks = {
'709632': {
labelEvent: 'Taproot 🌱 activation',
labelEventCompleted: 'Taproot 🌱 has been activated!',
},
'840000': {
labelEvent: 'Halving 🥳',
labelEventCompleted: 'Block Subsidy has halved to 3.125 BTC per block',
}
};

View File

@@ -3,6 +3,7 @@ import { NgModule } from '@angular/core';
import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { InfiniteScrollModule } from 'ngx-infinite-scroll';
import { NgxEchartsModule } from 'ngx-echarts';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './components/app/app.component';
@@ -22,19 +23,21 @@ import { AddressLabelsComponent } from './components/address-labels/address-labe
import { MempoolBlocksComponent } from './components/mempool-blocks/mempool-blocks.component';
import { MasterPageComponent } from './components/master-page/master-page.component';
import { BisqMasterPageComponent } from './components/bisq-master-page/bisq-master-page.component';
import { LiquidMasterPageComponent } from './components/liquid-master-page/liquid-master-page.component';
import { AboutComponent } from './components/about/about.component';
import { TelevisionComponent } from './components/television/television.component';
import { StatisticsComponent } from './components/statistics/statistics.component';
import { ChartistComponent } from './components/statistics/chartist.component';
import { BlockchainBlocksComponent } from './components/blockchain-blocks/blockchain-blocks.component';
import { BlockchainComponent } from './components/blockchain/blockchain.component';
import { FooterComponent } from './components/footer/footer.component';
import { AudioService } from './services/audio.service';
import { MempoolBlockComponent } from './components/mempool-block/mempool-block.component';
import { FeeDistributionGraphComponent } from './components/fee-distribution-graph/fee-distribution-graph.component';
import { TimespanComponent } from './components/timespan/timespan.component';
import { IncomingTransactionsGraphComponent } from './components/incoming-transactions-graph/incoming-transactions-graph.component';
import { TimeSpanComponent } from './components/time-span/time-span.component';
import { SeoService } from './services/seo.service';
import { MempoolGraphComponent } from './components/mempool-graph/mempool-graph.component';
import { LbtcPegsGraphComponent } from './components/lbtc-pegs-graph/lbtc-pegs-graph.component';
import { AssetComponent } from './components/asset/asset.component';
import { AssetsComponent } from './assets/assets.component';
import { StatusViewComponent } from './components/status-view/status-view.component';
@@ -44,14 +47,17 @@ import { NgbTypeaheadModule } from '@ng-bootstrap/ng-bootstrap';
import { FeesBoxComponent } from './components/fees-box/fees-box.component';
import { DashboardComponent } from './dashboard/dashboard.component';
import { FontAwesomeModule, FaIconLibrary } from '@fortawesome/angular-fontawesome';
import { faAngleDown, faAngleUp, faBolt, faChartArea, faCogs, faCubes, faDatabase, faExchangeAlt, faInfoCircle,
faLink, faList, faSearch, faTachometerAlt, faThList, faTint, faTv, faAngleDoubleDown, faAngleDoubleUp, faChevronDown, faFileAlt, faRedoAlt } from '@fortawesome/free-solid-svg-icons';
import { faFilter, faAngleDown, faAngleUp, faAngleRight, faAngleLeft, faBolt, faChartArea, faCogs, faCubes, faDatabase, faExchangeAlt, faInfoCircle,
faLink, faList, faSearch, faCaretUp, faCaretDown, faTachometerAlt, faThList, faTint, faTv, faAngleDoubleDown, faSortUp, faAngleDoubleUp, faChevronDown, faFileAlt, faRedoAlt, faArrowAltCircleRight, faExternalLinkAlt } from '@fortawesome/free-solid-svg-icons';
import { ApiDocsComponent } from './components/api-docs/api-docs.component';
import { CodeTemplateComponent } from './components/api-docs/code-template.component';
import { TermsOfServiceComponent } from './components/terms-of-service/terms-of-service.component';
import { PrivacyPolicyComponent } from './components/privacy-policy/privacy-policy.component';
import { TrademarkPolicyComponent } from './components/trademark-policy/trademark-policy.component';
import { StorageService } from './services/storage.service';
import { HttpCacheInterceptor } from './services/http-cache.interceptor';
import { SponsorComponent } from './components/sponsor/sponsor.component';
import { PushTransactionComponent } from './components/push-transaction/push-transaction.component';
@NgModule({
declarations: [
@@ -59,6 +65,7 @@ import { SponsorComponent } from './components/sponsor/sponsor.component';
AboutComponent,
MasterPageComponent,
BisqMasterPageComponent,
LiquidMasterPageComponent,
TelevisionComponent,
BlockchainComponent,
StartComponent,
@@ -71,14 +78,15 @@ import { SponsorComponent } from './components/sponsor/sponsor.component';
AmountComponent,
LatestBlocksComponent,
SearchFormComponent,
TimespanComponent,
TimeSpanComponent,
AddressLabelsComponent,
MempoolBlocksComponent,
ChartistComponent,
FooterComponent,
MempoolBlockComponent,
FeeDistributionGraphComponent,
IncomingTransactionsGraphComponent,
MempoolGraphComponent,
LbtcPegsGraphComponent,
AssetComponent,
AssetsComponent,
MinerComponent,
@@ -88,7 +96,10 @@ import { SponsorComponent } from './components/sponsor/sponsor.component';
ApiDocsComponent,
CodeTemplateComponent,
TermsOfServiceComponent,
PrivacyPolicyComponent,
TrademarkPolicyComponent,
SponsorComponent,
PushTransactionComponent,
],
imports: [
BrowserModule.withServerTransition({ appId: 'serverApp' }),
@@ -100,6 +111,9 @@ import { SponsorComponent } from './components/sponsor/sponsor.component';
NgbTypeaheadModule,
FontAwesomeModule,
SharedModule,
NgxEchartsModule.forRoot({
echarts: () => import('echarts')
})
],
providers: [
ElectrsApiService,
@@ -128,6 +142,7 @@ export class AppModule {
library.addIcons(faLink);
library.addIcons(faBolt);
library.addIcons(faTint);
library.addIcons(faFilter);
library.addIcons(faAngleDown);
library.addIcons(faAngleUp);
library.addIcons(faExchangeAlt);
@@ -136,5 +151,12 @@ export class AppModule {
library.addIcons(faChevronDown);
library.addIcons(faFileAlt);
library.addIcons(faRedoAlt);
library.addIcons(faArrowAltCircleRight);
library.addIcons(faExternalLinkAlt);
library.addIcons(faSortUp);
library.addIcons(faCaretUp);
library.addIcons(faCaretDown);
library.addIcons(faAngleRight);
library.addIcons(faAngleLeft);
}
}

View File

@@ -1,11 +1,11 @@
<div class="container-xl">
<h1 style="float: left;" i18n="Registered assets page header">Registered assets</h1>
<br>
<div class="title-asset">
<h1 i18n="Registered assets page header">Registered assets</h1>
</div>
<div class="clearfix"></div>
<form [formGroup]="searchForm" class="form-inline">
<div class="input-group m-2">
<div class="input-group mb-2">
<input style="width: 250px;" formControlName="searchText" type="text" class="form-control" i18n-placeholder="Search Assets Placeholder Text" placeholder="Search asset">
<div class="input-group-append">
<button [disabled]="!searchForm.get('searchText')?.value.length" class="btn btn-secondary" type="button" (click)="searchForm.get('searchText')?.setValue('');" autocomplete="off" i18n="Search Clear Button">Clear</button>
@@ -20,16 +20,14 @@
<th i18n="Asset ticker header">Ticker</th>
<th class="d-none d-md-block" i18n="Asset Issuer Domain header">Issuer domain</th>
<th i18n="Asset ID header">Asset ID</th>
<th class="d-none d-lg-block" i18n="Asset issuance transaction header">Issuance TX</th>
</thead>
<tbody>
<tr *ngFor="let asset of filteredAssets; trackBy: trackByAsset">
<td class="td-name">{{ asset.name }}</td>
<td class="td-name"><a [routerLink]="['/asset/' | relativeUrl, asset.asset_id]">{{ asset.name }}</a></td>
<td>{{ asset.ticker }}</td>
<td class="d-none d-md-block"><a *ngIf="asset.entity" target="_blank" href="{{ 'http://' + asset.entity.domain }}">{{ asset.entity.domain }}</a></td>
<td class="d-none d-md-block">{{ asset.entity && asset.entity.domain }}</td>
<td><a [routerLink]="['/asset/' | relativeUrl, asset.asset_id]">{{ asset.asset_id | shortenString : 13 }}</a> <app-clipboard class="d-none d-sm-inline-block" [text]="asset.asset_id"></app-clipboard></td>
<td class="d-none d-lg-block"><ng-template [ngIf]="asset.issuance_txin"><a [routerLink]="['/tx/' | relativeUrl, asset.issuance_txin.txid]">{{ asset.issuance_txin.txid | shortenString : 13 }}</a> <app-clipboard class="d-none d-sm-inline-block" [text]="asset.issuance_txin.txid"></app-clipboard></ng-template></td>
</tr>
</tr>
</tbody>
</table>
@@ -47,16 +45,14 @@
<th i18n="Asset ticker header">Ticker</th>
<th i18n="Asset Issuer Domain header">Issuer domain</th>
<th i18n="Asset ID header">Asset ID</th>
<th i18n="Asset issuance transaction header">Issuance TX</th>
</thead>
<tbody>
<tr *ngFor="let dummy of [0,0,0]">
<tr *ngFor="let dummy of [0,0,0,0,0,0,0,0,0,0]">
<td><span class="skeleton-loader"></span></td>
<td><span class="skeleton-loader"></span></td>
<td class="d-none d-md-block"><span class="skeleton-loader"></span></td>
<td><span class="skeleton-loader"></span></td>
<td class="d-none d-lg-block"><span class="skeleton-loader"></span></td>
</tr>
</tr>
</tbody>
</table>
@@ -72,4 +68,4 @@
</div>
<br>
<br>

View File

@@ -3,4 +3,11 @@
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
.title-asset {
h1 {
line-height: 1;
margin: 0px;
padding-bottom: 10px;
}
}

View File

@@ -107,7 +107,7 @@ export class AssetsComponent implements OnInit {
const start = (this.page - 1) * this.itemsPerPage;
if (searchText.length ) {
const filteredAssets = this.assetsCache.filter((asset) => asset.name.toLowerCase().indexOf(searchText.toLowerCase()) > -1
|| asset.ticker.toLowerCase().indexOf(searchText.toLowerCase()) > -1);
|| (asset.ticker || '').toLowerCase().indexOf(searchText.toLowerCase()) > -1);
this.assets = filteredAssets;
return filteredAssets.slice(start, this.itemsPerPage + start);
} else {

View File

@@ -59,7 +59,7 @@
<span style="float: left;" class="d-none d-md-block">{{ tx.id }}</span>
</a>
<div class="float-right">
{{ tx.time | date:'yyyy-MM-dd HH:mm' }}
&lrm;{{ tx.time | date:'yyyy-MM-dd HH:mm' }}
</div>
<div class="clearfix"></div>
</div>

View File

@@ -1,9 +1,11 @@
<div class="container-xl">
<div class="title-block">
<h1><ng-template [ngIf]="blockHeight" i18n="block.block">Block <a [routerLink]="['/block/' | relativeUrl, blockHash]">{{ blockHeight }}</a></ng-template></h1>
<h1><ng-template [ngIf]="blockHeight" i18n="shared.block-title">Block <ng-container *ngTemplateOutlet="blockTemplateContent"></ng-container></ng-template></h1>
</div>
<ng-template #blockTemplateContent><a [routerLink]="['/block/' | relativeUrl, blockHash]">{{ blockHeight }}</a></ng-template>
<div class="clearfix"></div>
<ng-template [ngIf]="!isLoading && !error">
@@ -20,7 +22,7 @@
<tr>
<td i18n="transaction.timestamp|Transaction Timestamp">Timestamp</td>
<td>
{{ block.time | date:'yyyy-MM-dd HH:mm' }}
&lrm;{{ block.time | date:'yyyy-MM-dd HH:mm' }}
<div class="lg-inline">
<i class="symbol">(<app-time-since [time]="block.time / 1000" [fastRender]="true"></app-time-since>)</i>
</div>
@@ -58,7 +60,7 @@
<span style="float: left;" class="d-none d-md-block">{{ tx.id }}</span>
</a>
<div class="float-right">
{{ tx.time | date:'yyyy-MM-dd HH:mm' }}
&lrm;{{ tx.time | date:'yyyy-MM-dd HH:mm' }}
</div>
<div class="clearfix"></div>
</div>

View File

@@ -1,4 +1,4 @@
<div class="container-xl">
<div class="container-xl" (window:resize)="onResize($event)">
<h1 style="float: left;" i18n="Bisq blocks header">BSQ Blocks</h1>
<br>
@@ -26,9 +26,7 @@
</div>
<br>
<div class="pagination">
<ngb-pagination *ngIf="blocks.value" [size]="paginationSize" [collectionSize]="blocks.value[1]" [rotate]="true" [pageSize]="itemsPerPage" [(page)]="page" (pageChange)="pageChange(page)" [maxSize]="paginationMaxSize" [boundaryLinks]="true"></ngb-pagination>
</div>
<ngb-pagination *ngIf="blocks.value" class="pagination-container" [size]="paginationSize" [collectionSize]="blocks.value[1]" [rotate]="true" [pageSize]="itemsPerPage" [(page)]="page" (pageChange)="pageChange(page)" [maxSize]="paginationMaxSize" [boundaryLinks]="true" [ellipses]="false"></ngb-pagination>
</ng-container>
</div>

View File

@@ -1,3 +1,11 @@
.pagination {
overflow: hidden;
.pagination-container {
float: none;
margin-bottom: 200px;
@media(min-width: 400px){
float: right;
}
}
.container-xl {
padding-bottom: 110px;
}

View File

@@ -23,7 +23,7 @@ export class BisqBlocksComponent implements OnInit {
isLoading = true;
// @ts-ignore
paginationSize: 'sm' | 'lg' = 'md';
paginationMaxSize = 4;
paginationMaxSize = 5;
constructor(
private websocketService: WebsocketService,
@@ -38,7 +38,7 @@ export class BisqBlocksComponent implements OnInit {
this.seoService.setTitle($localize`:@@8a7b4bd44c0ac71b2e72de0398b303257f7d2f54:Blocks`);
this.itemsPerPage = Math.max(Math.round(this.contentSpace / this.fiveItemsPxSize) * 5, 10);
this.loadingItems = Array(this.itemsPerPage);
if (document.body.clientWidth < 768) {
if (document.body.clientWidth < 670) {
this.paginationSize = 'sm';
this.paginationMaxSize = 3;
}
@@ -83,4 +83,8 @@ export class BisqBlocksComponent implements OnInit {
queryParamsHandling: 'merge',
});
}
onResize(event: any) {
this.paginationMaxSize = event.target.innerWidth < 670 ? 3 : 5;
}
}

View File

@@ -17,7 +17,7 @@
<div class="container-info">
<h1>
<ng-template [ngIf]="stateService.env.OFFICIAL_BISQ_MARKETS" [ngIfElse]="nonOfficialMarkets" i18n="Bisq All Markets">Markets</ng-template>
<ng-template [ngIf]="stateService.env.BASE_MODULE === 'bisq'" [ngIfElse]="nonOfficialMarkets" i18n="Bisq All Markets">Markets</ng-template>
<ng-template #nonOfficialMarkets i18n="Bisq Bitcoin Markets">Bitcoin Markets</ng-template>
</h1>
<ng-container *ngIf="{ value: (tickers$ | async) } as tickers">

View File

@@ -17,19 +17,6 @@
z-index: 100;
}
.table-container {
overflow: scroll;
-ms-overflow-style: none;
scrollbar-width: none;
font-size: 13px;
@media(min-width: 576px){
font-size: 16px;
}
&::-webkit-scrollbar {
display: none;
}
}
.container-info{
overflow-x: scroll;
}

View File

@@ -69,7 +69,7 @@ export class BisqDashboardComponent implements OnInit {
const newTickers = [];
for (const t in tickers) {
if (!this.stateService.env.OFFICIAL_BISQ_MARKETS) {
if (this.stateService.env.BASE_MODULE !== 'bisq') {
const pair = t.split('_');
if (pair[1] === 'btc' && this.allowCryptoCoins.indexOf(pair[0]) === -1) {
continue;
@@ -106,7 +106,7 @@ export class BisqDashboardComponent implements OnInit {
])
.pipe(
map(([trades, markets]) => {
if (!this.stateService.env.OFFICIAL_BISQ_MARKETS) {
if (this.stateService.env.BASE_MODULE !== 'bisq') {
trades = trades.filter((trade) => {
const pair = trade.market.split('_');
return !(pair[1] === 'btc' && this.allowCryptoCoins.indexOf(pair[0]) === -1);

View File

@@ -63,7 +63,7 @@
<div class="card">
<div class="card-body">
<h5 class="card-title text-center">
<ng-template [ngIf]="stateService.env.OFFICIAL_BISQ_MARKETS" [ngIfElse]="nonOfficialMarkets" i18n="Bisq All Markets">Markets</ng-template>
<ng-template [ngIf]="stateService.env.BASE_MODULE === 'bisq'" [ngIfElse]="nonOfficialMarkets" i18n="Bisq All Markets">Markets</ng-template>
<ng-template #nonOfficialMarkets i18n="Bisq Bitcoin Markets">Bitcoin Markets</ng-template>
</h5>
@@ -105,7 +105,7 @@
</ng-container>
</div>
<app-language-selector *ngIf="!stateService.env.OFFICIAL_BISQ_MARKETS"></app-language-selector>
<app-language-selector *ngIf="stateService.env.BASE_MODULE !== 'bisq'"></app-language-selector>
<div class="text-small text-center mt-3">
<a [routerLink]="['/terms-of-service']" i18n="shared.terms-of-service|Terms of Service">Terms of Service</a>

View File

@@ -18,15 +18,44 @@
}
.table-container {
font-size: 13px;
@media(min-width: 576px){
font-size: 16px;
overflow: scroll;
scrollbar-width: none;
font-size: 13px;
&::-webkit-scrollbar {
display: none;
}
@media(min-width: 576px){
font-size: 16px;
}
thead th{
text-align: right;
&:first-child {
text-align: left;
}
&::-webkit-scrollbar {
&:nth-child(3) {
display: none;
@media(min-width: 1100px){
display: table-cell;
}
}
}
tr {
td {
text-align: right;
&:first-child {
text-align: left;
}
&:nth-child(3) {
display: none;
@media(min-width: 1100px){
display: table-cell;
}
}
}
}
}
.chart-container {
height: 300px;
}
@@ -41,44 +70,43 @@
background-color: #1d1f31;
height: 100%;
}
.card-title {
color: #4a68b9;
font-size: 1rem;
}
.info-block {
float: left;
width: 350px;
line-height: 25px;
}
.progress {
display: inline-flex;
width: 100%;
background-color: #2d3348;
height: 1.1rem;
}
.bg-warning {
background-color: #b58800 !important;
}
.skeleton-loader {
max-width: 100%;
&.shorter {
max-width: 150px;
}
}
.more-padding {
padding: 1.25rem 2rem 1.25rem 2rem;
}
.graph-card {
height: 100%;
@media (min-width: 992px) {
height: 385px;
}
}

View File

@@ -77,7 +77,7 @@ export class BisqMainDashboardComponent implements OnInit {
const newTickers = [];
for (const t in tickers) {
if (!this.stateService.env.OFFICIAL_BISQ_MARKETS) {
if (this.stateService.env.BASE_MODULE !== 'bisq') {
const pair = t.split('_');
if (pair[1] === 'btc' && this.allowCryptoCoins.indexOf(pair[0]) === -1) {
continue;
@@ -114,7 +114,7 @@ export class BisqMainDashboardComponent implements OnInit {
])
.pipe(
map(([trades, markets]) => {
if (!this.stateService.env.OFFICIAL_BISQ_MARKETS) {
if (this.stateService.env.BASE_MODULE !== 'bisq') {
trades = trades.filter((trade) => {
const pair = trade.market.split('_');
return !(pair[1] === 'btc' && this.allowCryptoCoins.indexOf(pair[0]) === -1);

View File

@@ -12,7 +12,7 @@
<tbody *ngIf="(trades$ | async) as trades; else loadingTmpl">
<tr *ngFor="let trade of trades;">
<td>
{{ trade.trade_date | date:'yyyy-MM-dd HH:mm' }}
&lrm;{{ trade.trade_date | date:'yyyy-MM-dd HH:mm' }}
</td>
<td *ngIf="view === 'all'">
<ng-container *ngIf="(trade._market || market).rtype === 'fiat'; else priceCrypto"><span class="green-color">{{ trade.price | currency: (trade._market || market).rsymbol }}</span></ng-container>

View File

@@ -1,12 +1,38 @@
.table-container {
overflow: scroll;
-ms-overflow-style: none;
scrollbar-width: none;
font-size: 13px;
@media(min-width: 576px){
font-size: 16px;
overflow: scroll;
scrollbar-width: none;
font-size: 13px;
&::-webkit-scrollbar {
display: none;
}
@media(min-width: 576px){
font-size: 16px;
}
thead th{
text-align: right;
&:first-child{
text-align: left;
}
&::-webkit-scrollbar {
&:nth-child(2) {
display: none;
@media(min-width: 1100px){
display: table-cell;
}
}
}
tr {
td {
text-align: right;
&:first-child{
text-align: left;
}
&:nth-child(2) {
display: none;
@media(min-width: 1100px){
display: table-cell;
}
}
}
}
}

View File

@@ -1,104 +1,117 @@
<div class="container-xl">
<ng-template [ngIf]="!isLoading && !error">
<div class="title-block">
<div class="title">
<h1 i18n="shared.transaction">Transaction</h1>
</div>
<button *ngIf="(latestBlock$ | async) as latestBlock" type="button" class="btn btn-sm btn-success float-right">
<ng-container *ngTemplateOutlet="latestBlock.height - bisqTx.blockHeight + 1 == 1 ? confirmationSingular : confirmationPlural; context: {$implicit: latestBlock.height - bisqTx.blockHeight + 1}"></ng-container>
<ng-template #confirmationSingular let-i i18n="shared.confirmation-count.singular|Transaction singular confirmation count">{{ i }} confirmation</ng-template>
<ng-template #confirmationPlural let-i i18n="shared.confirmation-count.plural|Transaction plural confirmation count">{{ i }} confirmations</ng-template>
</button>
<h1 i18n="shared.transaction">Transaction</h1>
<div class="tx-link">
<a [routerLink]="['/bisq-tx' | relativeUrl, bisqTx.id]">
<span class="d-inline d-lg-none">{{ bisqTx.id | shortenString : 24 }}</span>
<span class="d-none d-lg-inline">{{ bisqTx.id }}</span>
</a>
<app-clipboard [text]="bisqTx.id"></app-clipboard>
</div>
<div class="clearfix"></div>
<div class="box transaction-container">
<div class="row">
<div class="col-sm">
<table class="table table-borderless table-striped">
<tbody>
<tr>
<td i18n="transaction.timestamp|Transaction Timestamp">Timestamp</td>
<td>
{{ bisqTx.time | date:'yyyy-MM-dd HH:mm' }}
<div class="lg-inline">
<i class="symbol">(<app-time-since [time]="bisqTx.time / 1000" [fastRender]="true"></app-time-since>)</i>
</div>
</td>
</tr>
<tr>
<td class="td-width" i18n="transaction.included-in-block|Transaction included in block">Included in block</td>
<td>
<a [routerLink]="['/block/' | relativeUrl, bisqTx.blockHash]" [state]="{ data: { blockHeight: bisqTx.blockHeight } }">{{ bisqTx.blockHeight }}</a>
</td>
</tr>
<tr>
<td class="td-width" i18n="transaction.features|Transaction features">Features</td>
<td>
<app-tx-features *ngIf="tx; else loadingTx" [tx]="tx"></app-tx-features>
<ng-template #loadingTx>
<span class="skeleton-loader"></span>
</ng-template>
</td>
</tr>
</tbody>
</table>
</div>
<div class="col-sm">
<table class="table table-borderless table-striped">
<tbody>
<tr>
<td class="td-width" i18n="BSQ burnt amount">Burnt amount</td>
<td>
{{ bisqTx.burntFee / 100 | number: '1.2-2' }} <span class="symbol">BSQ</span> <span class="fiat"><app-bsq-amount [bsq]="bisqTx.burntFee" [forceFiat]="true" [green]="true"></app-bsq-amount></span>
</tr>
<tr>
<td i18n="transaction.fee-per-vbyte|Transaction fee">Fee per vByte</td>
<td *ngIf="!isLoadingTx; else loadingTxFee">
{{ tx.fee / (tx.weight / 4) | number : '1.1-1' }} <span class="symbol">sat/vB</span>
&nbsp;
<app-tx-fee-rating [tx]="tx"></app-tx-fee-rating>
</td>
<ng-template #loadingTxFee>
<td><span class="skeleton-loader"></span></td>
</ng-template>
</tr>
</tbody>
</table>
</div>
<span class="tx-link float-left">
<a [routerLink]="['/bisq-tx' | relativeUrl, bisqTx.id]">
<span class="d-inline d-lg-none">{{ bisqTx.id | shortenString : 24 }}</span>
<span class="d-none d-lg-inline">{{ bisqTx.id }}</span>
</a>
<app-clipboard [text]="bisqTx.id"></app-clipboard>
</span>
<span class="grow"></span>
<div class="container-buttons">
<button *ngIf="(latestBlock$ | async) as latestBlock" type="button" class="btn btn-sm btn-success float-right">
<ng-container *ngTemplateOutlet="latestBlock.height - bisqTx.blockHeight + 1 == 1 ? confirmationSingular : confirmationPlural; context: {$implicit: latestBlock.height - bisqTx.blockHeight + 1}"></ng-container>
<ng-template #confirmationSingular let-i i18n="shared.confirmation-count.singular|Transaction singular confirmation count">{{ i }} confirmation</ng-template>
<ng-template #confirmationPlural let-i i18n="shared.confirmation-count.plural|Transaction plural confirmation count">{{ i }} confirmations</ng-template>
</button>
</div>
</div>
<div class="clearfix"></div>
<br>
<div class="box transaction-container">
<div class="row">
<div class="col-sm">
<table class="table table-borderless table-striped">
<tbody>
<tr>
<td i18n="transaction.timestamp|Transaction Timestamp">Timestamp</td>
<td>
&lrm;{{ bisqTx.time | date:'yyyy-MM-dd HH:mm' }}
<div class="lg-inline">
<i class="symbol">(<app-time-since [time]="bisqTx.time / 1000" [fastRender]="true"></app-time-since>)</i>
</div>
</td>
</tr>
<tr>
<td class="td-width" i18n="transaction.included-in-block|Transaction included in block">Included in block</td>
<td>
<a [routerLink]="['/block/' | relativeUrl, bisqTx.blockHash]" [state]="{ data: { blockHeight: bisqTx.blockHeight } }">{{ bisqTx.blockHeight }}</a>
</td>
</tr>
<tr>
<td class="td-width" i18n="transaction.features|Transaction features">Features</td>
<td>
<app-tx-features *ngIf="tx; else loadingTx" [tx]="tx"></app-tx-features>
<ng-template #loadingTx>
<span class="skeleton-loader"></span>
</ng-template>
</td>
</tr>
</tbody>
</table>
</div>
<div class="col-sm">
<table class="table table-borderless table-striped">
<tbody>
<tr>
<td class="td-width" i18n="BSQ burnt amount">Burnt amount</td>
<td>
{{ bisqTx.burntFee / 100 | number: '1.2-2' }} <span class="symbol">BSQ</span> <span class="fiat"><app-bsq-amount [bsq]="bisqTx.burntFee" [forceFiat]="true" [green]="true"></app-bsq-amount></span>
</tr>
<tr>
<td i18n="transaction.fee-per-vbyte|Transaction fee">Fee per vByte</td>
<td *ngIf="!isLoadingTx; else loadingTxFee">
{{ tx.fee / (tx.weight / 4) | feeRounding }} <span class="symbol">sat/vB</span>
&nbsp;
<app-tx-fee-rating [tx]="tx"></app-tx-fee-rating>
</td>
<ng-template #loadingTxFee>
<td><span class="skeleton-loader"></span></td>
</ng-template>
</tr>
</tbody>
</table>
</div>
<h2 i18n="transaction.details">Details</h2>
</div>
</div>
<br>
<app-bisq-transaction-details [tx]="bisqTx"></app-bisq-transaction-details>
<div class="title">
<h2 i18n="transaction.details">Details</h2>
</div>
<br>
<app-bisq-transaction-details [tx]="bisqTx"></app-bisq-transaction-details>
<h2 i18n="transaction.inputs-and-outputs|Transaction inputs and outputs">Inputs & Outputs</h2>
<br>
<app-bisq-transfers [tx]="bisqTx"></app-bisq-transfers>
<div class="title">
<h2 i18n="transaction.inputs-and-outputs|Transaction inputs and outputs">Inputs & Outputs</h2>
</div>
<br>
<app-bisq-transfers [tx]="bisqTx"></app-bisq-transfers>
</ng-template>
<br>
</ng-template>
<ng-template [ngIf="isLoading && !error">
<ng-template [ngIf]="isLoading && !error">
<div class="clearfix"></div>
<div class="title-block">
<div class="title">
<h1 i18n="shared.transaction">Transaction</h1>
</div>
</div>
<div class="box">
<div class="row">
<div class="col-sm">
@@ -108,6 +121,14 @@
<td class="td-width"><span class="skeleton-loader"></span></td>
<td><span class="skeleton-loader"></span></td>
</tr>
<tr>
<td class="td-width"><span class="skeleton-loader"></span></td>
<td><span class="skeleton-loader"></span></td>
</tr>
<tr>
<td class="td-width"><span class="skeleton-loader"></span></td>
<td><span class="skeleton-loader"></span></td>
</tr>
</tbody>
</table>
</div>
@@ -118,6 +139,10 @@
<td class="td-width"><span class="skeleton-loader"></span></td>
<td><span class="skeleton-loader"></span></td>
</tr>
<tr>
<td class="td-width"><span class="skeleton-loader"></span></td>
<td><span class="skeleton-loader"></span></td>
</tr>
</tbody>
</table>
</div>
@@ -126,7 +151,10 @@
<br>
<h2 i18n="transaction.details">Details</h2>
<div class="title">
<h2 i18n="transaction.details">Details</h2>
</div>
<div class="box">
<table class="table table-borderless table-striped">
<tbody>
@@ -147,18 +175,30 @@
<br>
<h2 i18n="transaction.inputs-and-outputs|Transaction inputs and outputs">Inputs & Outputs</h2>
<div class="title">
<h2 i18n="transaction.inputs-and-outputs|Transaction inputs and outputs">Inputs & Outputs</h2>
</div>
<div class="box">
<div class="row">
<table class="table table-borderless table-striped">
<tbody>
<tr>
<td><span class="skeleton-loader"></span></td>
<td><span class="skeleton-loader"></span></td>
</tr>
</tbody>
</table>
<div class="col-sm">
<table class="table table-borderless table-striped">
<tbody>
<tr>
<td><span class="skeleton-loader"></span></td>
</tr>
</tbody>
</table>
</div>
<div class="col-sm">
<table class="table table-borderless table-striped">
<tbody>
<tr>
<td><span class="skeleton-loader"></span></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
@@ -174,4 +214,4 @@
</div>
</ng-template>
</div>
</div>

View File

@@ -1,126 +1 @@
.adjust-btn-padding {
padding: 0.55rem;
}
.title-block {
padding-top: 1px;
}
@media (max-width: 767.98px) {
.mobile-bottomcol {
margin-top: 15px;
}
}
.td-width {
width: 150px;
@media (min-width: 768px) {
width: 175px;
}
}
h1 {
margin-bottom: 0;
}
.badge {
position: relative;
top: -1px;
}
.btn-small-height {
line-height: 1.1;
}
.arrow-green {
color: #1a9436;
}
.arrow-red {
color: #dc3545;
}
.btn-success {
float: right;
margin-bottom: 0px;
margin-top: 5px;
}
.tx-link {
display: block;
width: auto;
margin-bottom: 10px;
margin-left: 2px;
margin-top: 40px;
position: absolute;
@media (min-width: 700px) {
margin-top: 14px;
margin-left: 10px;
position: relative;
text-align: left;
width: 100%;
top: 14px;
left: 10px;
}
}
.container-xl {
margin-bottom: 40px;
}
.row{
flex-direction: column;
@media (min-width: 768px) {
flex-direction: row;
}
}
@media (max-width: 767.98px) {
.mobile-bottomcol {
margin-top: 15px;
}
.details-table td:first-child {
white-space: pre-wrap;
}
}
.fiat {
display: block;
font-size: 13px;
@media (min-width: 576px){
display: inline-block;
margin-left: 15px;
font-size: 14px;
text-align: left;
}
}
h1{
font-size: 1.75rem;
margin-top: 2px;
margin-bottom: 0;
float: left;
padding-bottom: 40px;
@media (min-width: 375px){
margin-top: 0px;
font-size: 2rem;
}
@media (min-width: 768px){
padding-bottom: 10px;
}
}
.transaction-container {
font-size: 14px;
@media (min-width: 576px){
font-size: 16px;
}
tr td {
&:last-child{
text-align: right;
@media (min-width: 768px){
text-align: left;
}
}
}
}
@import "./../../components/transaction/transaction.component.scss";

View File

@@ -85,7 +85,11 @@ export class BisqTransactionComponent implements OnInit, OnDestroy {
}
if (tx.version) {
this.router.navigate(['/tx/', this.txId], { state: { data: tx, bsqTx: true }});
if (this.stateService.env.BASE_MODULE === 'bisq') {
window.location.replace('https://mempool.space/tx/' + this.txId);
} else {
this.router.navigate(['/tx/', this.txId], { state: { data: tx, bsqTx: true }});
}
return of(null);
}

View File

@@ -1,4 +1,4 @@
<div class="container-xl">
<div class="container-xl" (window:resize)="onResize($event)">
<h1 style="float: left;" i18n>BSQ Transactions</h1>
<div class="d-block float-right">
@@ -44,9 +44,7 @@
</table>
<br>
<div class="pagination">
<ngb-pagination *ngIf="transactions.value" [size]="paginationSize" [collectionSize]="transactions.value[1]" [rotate]="true" [pageSize]="itemsPerPage" [(page)]="page" (pageChange)="pageChange(page)" [maxSize]="paginationMaxSize" [boundaryLinks]="true"></ngb-pagination>
</div>
<ngb-pagination class="pagination-container" *ngIf="transactions.value" [collectionSize]="transactions.value[1]" [rotate]="true" [pageSize]="itemsPerPage" [(page)]="page" (pageChange)="pageChange(page)" [maxSize]="paginationMaxSize" [boundaryLinks]="true" [ellipses]="false"></ngb-pagination>
</ng-container>
</div>

View File

@@ -8,13 +8,16 @@ label {
left: inherit;
}
.pagination {
overflow: hidden;
.pagination-container {
float: none;
@media(min-width: 400px){
float: right;
}
}
h1{
font-size: 1.5rem;
@media(min-width: 375px){
font-size: 2rem;
.container-xl {
padding-bottom: 60px;
@media(min-width: 400px){
padding-bottom: 100px;
}
}

View File

@@ -1,8 +1,8 @@
import { Component, OnInit, ChangeDetectionStrategy, ChangeDetectorRef } from '@angular/core';
import { Component, OnInit, ChangeDetectionStrategy, ChangeDetectorRef, OnDestroy } from '@angular/core';
import { BisqTransaction, BisqOutput } from '../bisq.interfaces';
import { merge, Observable } from 'rxjs';
import { switchMap, map, tap, filter } from 'rxjs/operators';
import { Observable, Subscription } from 'rxjs';
import { switchMap, map, tap } from 'rxjs/operators';
import { BisqApiService } from '../bisq-api.service';
import { SeoService } from 'src/app/services/seo.service';
import { FormGroup, FormBuilder } from '@angular/forms';
@@ -16,7 +16,7 @@ import { WebsocketService } from 'src/app/services/websocket.service';
styleUrls: ['./bisq-transactions.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush
})
export class BisqTransactionsComponent implements OnInit {
export class BisqTransactionsComponent implements OnInit, OnDestroy {
transactions$: Observable<[BisqTransaction[], number]>;
page = 1;
itemsPerPage = 50;
@@ -25,6 +25,7 @@ export class BisqTransactionsComponent implements OnInit {
loadingItems: number[];
radioGroupForm: FormGroup;
types: string[] = [];
radioGroupSubscription: Subscription;
txTypeOptions: IMultiSelectOption[] = [
{ id: 1, name: $localize`Asset listing fee` },
@@ -60,7 +61,7 @@ export class BisqTransactionsComponent implements OnInit {
// @ts-ignore
paginationSize: 'sm' | 'lg' = 'md';
paginationMaxSize = 4;
paginationMaxSize = 5;
txTypes = ['ASSET_LISTING_FEE', 'BLIND_VOTE', 'COMPENSATION_REQUEST', 'GENESIS', 'LOCKUP', 'PAY_TRADE_FEE',
'PROOF_OF_BURN', 'PROPOSAL', 'REIMBURSEMENT_REQUEST', 'TRANSFER_BSQ', 'UNLOCK', 'VOTE_REVEAL', 'IRREGULAR'];
@@ -85,57 +86,44 @@ export class BisqTransactionsComponent implements OnInit {
this.loadingItems = Array(this.itemsPerPage);
if (document.body.clientWidth < 768) {
if (document.body.clientWidth < 670) {
this.paginationSize = 'sm';
this.paginationMaxSize = 3;
}
this.transactions$ = merge(
this.route.queryParams
.pipe(
filter((queryParams) => {
const newPage = parseInt(queryParams.page, 10);
const types = queryParams.types;
if (newPage !== this.page || types !== this.types.map((type) => this.txTypes.indexOf(type) + 1).join(',')) {
return true;
}
return false;
}),
tap((queryParams) => {
if (queryParams.page) {
const newPage = parseInt(queryParams.page, 10);
this.page = newPage;
} else {
this.page = 1;
}
if (queryParams.types) {
const types = queryParams.types.split(',').map((str: string) => parseInt(str, 10));
this.types = types.map((id: number) => this.txTypes[id - 1]);
this.radioGroupForm.get('txTypes').setValue(types, { emitEvent: false });
} else {
this.types = [];
this.radioGroupForm.get('txTypes').setValue(this.txTypesDefaultChecked, { emitEvent: false });
}
this.cd.markForCheck();
})
),
this.radioGroupForm.valueChanges
.pipe(
tap((data) => {
this.types = data.txTypes.map((id: number) => this.txTypes[id - 1]);
if (this.types.length === this.txTypes.length) {
this.types = [];
}
this.page = 1;
this.typesChanged(data.txTypes);
this.cd.markForCheck();
})
),
)
this.transactions$ = this.route.queryParams
.pipe(
tap((queryParams) => {
if (queryParams.page) {
const newPage = parseInt(queryParams.page, 10);
this.page = newPage;
} else {
this.page = 1;
}
if (queryParams.types) {
const types = queryParams.types.split(',').map((str: string) => parseInt(str, 10));
this.types = types.map((id: number) => this.txTypes[id - 1]);
this.radioGroupForm.get('txTypes').setValue(types, { emitEvent: false });
} else {
this.types = [];
this.radioGroupForm.get('txTypes').setValue([], { emitEvent: false });
}
this.cd.markForCheck();
}),
switchMap(() => this.bisqApiService.listTransactions$((this.page - 1) * this.itemsPerPage, this.itemsPerPage, this.types)),
map((response) => [response.body, parseInt(response.headers.get('x-total-count'), 10)])
);
this.radioGroupSubscription = this.radioGroupForm.valueChanges
.subscribe((data) => {
this.types = data.txTypes.map((id: number) => this.txTypes[id - 1]);
if (this.types.length === this.txTypes.length) {
this.types = [];
}
this.page = 1;
this.typesChanged(data.txTypes);
this.cd.markForCheck();
});
}
pageChange(page: number) {
@@ -144,8 +132,6 @@ export class BisqTransactionsComponent implements OnInit {
queryParams: { page: page },
queryParamsHandling: 'merge',
});
// trigger queryParams change
this.page = -1;
}
typesChanged(types: number[]) {
@@ -168,4 +154,12 @@ export class BisqTransactionsComponent implements OnInit {
trackByFn(index: number) {
return index;
}
onResize(event: any) {
this.paginationMaxSize = event.target.innerWidth < 670 ? 3 : 5;
}
ngOnDestroy(): void {
this.radioGroupSubscription.unsubscribe();
}
}

View File

@@ -7,11 +7,13 @@
<tr *ngIf="input.isVerified">
<td class="arrow-td">
<ng-template [ngIf]="input.spendingTxId === null" [ngIfElse]="hasPreoutput">
<i class="arrow grey"></i>
<span class="grey">
<fa-icon [icon]="['fas', 'arrow-alt-circle-right']" [fixedWidth]="true"></fa-icon>
</span>
</ng-template>
<ng-template #hasPreoutput>
<a [routerLink]="['/tx/' | relativeUrl, input.spendingTxId]">
<i class="arrow red"></i>
<a [routerLink]="['/tx/' | relativeUrl, input.spendingTxId]" class="red">
<fa-icon [icon]="['fas', 'arrow-alt-circle-right']" [fixedWidth]="true"></fa-icon>
</a>
</ng-template>
</td>
@@ -44,10 +46,14 @@
<td class="text-right nowrap">
<app-bsq-amount [bsq]="output.bsqAmount"></app-bsq-amount>
</td>
<td class="pl-1 arrow-td">
<i *ngIf="!output.spentInfo; else spent" class="arrow green"></i>
<td class="arrow-td">
<span *ngIf="!output.spentInfo; else spent" class="green">
<fa-icon [icon]="['fas', 'arrow-alt-circle-right']" [fixedWidth]="true"></fa-icon>
</span>
<ng-template #spent>
<a [routerLink]="['/tx/' | relativeUrl, output.spentInfo.txId]"><i class="arrow red"></i></a>
<a [routerLink]="['/tx/' | relativeUrl, output.spentInfo.txId]" class="red">
<fa-icon [icon]="['fas', 'arrow-alt-circle-right']" [fixedWidth]="true"></fa-icon>
</a>
</ng-template>
</td>
</tr>

View File

@@ -1,62 +1,26 @@
.arrow-td {
width: 22px;
width: 20px;
}
.arrow {
display: inline-block!important;
.green, .grey, .red {
font-size: 16px;
top: -2px;
position: relative;
width: 14px;
height: 22px;
box-sizing: content-box
@media( min-width: 576px){
font-size: 19px;
}
}
.arrow:before {
position: absolute;
content: '';
margin: auto;
top: 0;
bottom: 0;
left: 0;
right: calc(-1*30px/3);
width: 0;
height: 0;
border-top: 6.66px solid transparent;
border-bottom: 6.66px solid transparent
.green {
color:#28a745;
}
.arrow:after {
position: absolute;
content: '';
margin: auto;
top: 0;
bottom: 0;
left: 0;
right: calc(30px/6);
width: calc(30px/3);
height: calc(20px/3);
background: rgba(0, 0, 0, 0);
.red {
color:#dc3545;
}
.arrow.green:before {
border-left: 10px solid #28a745;
}
.arrow.green:after {
background-color:#28a745;
}
.arrow.red:before {
border-left: 10px solid #dc3545;
}
.arrow.red:after {
background-color:#dc3545;
}
.arrow.grey:before {
border-left: 10px solid #6c757d;
}
.arrow.grey:after {
background-color:#6c757d;
.grey {
color:#6c757d;
}
@media (max-width: 767.98px) {

View File

@@ -71,7 +71,7 @@ interface BisqScriptPubKey {
addresses: string[];
asm: string;
hex: string;
reqSigs: number;
reqSigs?: number;
type: string;
}

View File

@@ -12,6 +12,7 @@ import { BisqDashboardComponent } from './bisq-dashboard/bisq-dashboard.componen
import { BisqMarketComponent } from './bisq-market/bisq-market.component';
import { BisqMainDashboardComponent } from './bisq-main-dashboard/bisq-main-dashboard.component';
import { TermsOfServiceComponent } from '../components/terms-of-service/terms-of-service.component';
import { PushTransactionComponent } from '../components/push-transaction/push-transaction.component';
const routes: Routes = [
{
@@ -30,6 +31,10 @@ const routes: Routes = [
path: 'market/:pair',
component: BisqMarketComponent,
},
{
path: 'tx/push',
component: PushTransactionComponent,
},
{
path: 'tx/:id',
component: BisqTransactionComponent

Some files were not shown because too many files have changed in this diff Show More