Merge pull request #909 from SonicWizard/next
Added blockchain switcher and broadcast transaction page
This commit is contained in:
commit
30852fd11c
118
app/package-lock.json
generated
118
app/package-lock.json
generated
@ -663,9 +663,9 @@
|
||||
}
|
||||
},
|
||||
"@ionic/cli-framework": {
|
||||
"version": "0.1.2",
|
||||
"resolved": "https://registry.npmjs.org/@ionic/cli-framework/-/cli-framework-0.1.2.tgz",
|
||||
"integrity": "sha512-EEqcpkO7/uo4wt6d2cZHhWjO0yyD6HkEGsrl0ETbfUVJLR0NU3vDi9VvFM8K0NzHOaaHxCKzux+Y3+oJ7utZjA==",
|
||||
"version": "0.1.3",
|
||||
"resolved": "https://registry.npmjs.org/@ionic/cli-framework/-/cli-framework-0.1.3.tgz",
|
||||
"integrity": "sha512-by5vosr5MXK5+yJMtRmBX9YjrcHTeelVLV5PsDv56zZR0aDMLP+1st5wvjKwAjlva660bIzx7yIax88hiV5KKA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"chalk": "2.3.2",
|
||||
@ -744,19 +744,19 @@
|
||||
}
|
||||
},
|
||||
"@ionic/cli-utils": {
|
||||
"version": "1.19.1",
|
||||
"resolved": "https://registry.npmjs.org/@ionic/cli-utils/-/cli-utils-1.19.1.tgz",
|
||||
"integrity": "sha512-GUUn33FIaiN+hJTFnalZa67fcFN64lwupS/7+F1iUV/jPZNVzwpPWOWXs5a6hnuJuyNQvI6tm0Sm+P0HvGto1Q==",
|
||||
"version": "1.19.2",
|
||||
"resolved": "https://registry.npmjs.org/@ionic/cli-utils/-/cli-utils-1.19.2.tgz",
|
||||
"integrity": "sha512-nTbF273k1tcr6CPL5ARZ10VbXMNwRuW5svg42JFBEfxdbbVyvIUep+m4ibqBoDCRAFoDi28b4GeFkC5wyyDqQA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@ionic/cli-framework": "0.1.2",
|
||||
"@ionic/cli-framework": "0.1.3",
|
||||
"@ionic/discover": "0.4.0",
|
||||
"archiver": "2.1.1",
|
||||
"basic-auth": "1.1.0",
|
||||
"body-parser": "1.18.2",
|
||||
"chalk": "2.3.2",
|
||||
"chokidar": "1.7.0",
|
||||
"ci-info": "1.1.2",
|
||||
"ci-info": "1.1.3",
|
||||
"cross-spawn": "5.1.0",
|
||||
"dargs": "5.1.0",
|
||||
"diff": "3.5.0",
|
||||
@ -767,14 +767,14 @@
|
||||
"leek": "0.0.24",
|
||||
"lodash": "4.17.4",
|
||||
"minimist": "1.2.0",
|
||||
"opn": "5.2.0",
|
||||
"opn": "5.3.0",
|
||||
"os-name": "2.0.1",
|
||||
"semver": "5.4.1",
|
||||
"slice-ansi": "1.0.0",
|
||||
"ssh-config": "1.1.3",
|
||||
"string-width": "2.1.1",
|
||||
"superagent": "3.8.2",
|
||||
"tar": "4.4.0",
|
||||
"tar": "4.4.1",
|
||||
"tiny-lr": "1.1.1",
|
||||
"tslib": "1.9.0",
|
||||
"untildify": "3.0.2",
|
||||
@ -783,12 +783,6 @@
|
||||
"ws": "3.3.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"ansi-escapes": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.0.0.tgz",
|
||||
"integrity": "sha512-O/klc27mWNUigtv0F8NJWbLF00OcegQalkqKURWdosW08YZKi4m6CnSUSvIZG1otNJbTWhN01Hhz389DW7mvDQ==",
|
||||
"dev": true
|
||||
},
|
||||
"ansi-regex": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
|
||||
@ -822,12 +816,6 @@
|
||||
"type-is": "1.6.15"
|
||||
}
|
||||
},
|
||||
"bytes": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz",
|
||||
"integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=",
|
||||
"dev": true
|
||||
},
|
||||
"chalk": {
|
||||
"version": "2.3.2",
|
||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.2.tgz",
|
||||
@ -883,38 +871,10 @@
|
||||
"integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==",
|
||||
"dev": true
|
||||
},
|
||||
"inquirer": {
|
||||
"version": "3.3.0",
|
||||
"resolved": "https://registry.npmjs.org/inquirer/-/inquirer-3.3.0.tgz",
|
||||
"integrity": "sha512-h+xtnyk4EwKvFWHrUYsWErEVR+igKtLdchu+o0Z1RL7VU/jVMFbYir2bp6bAj8efFNxWqHX0dIss6fJQ+/+qeQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ansi-escapes": "3.0.0",
|
||||
"chalk": "2.3.2",
|
||||
"cli-cursor": "2.1.0",
|
||||
"cli-width": "2.1.0",
|
||||
"external-editor": "2.0.4",
|
||||
"figures": "2.0.0",
|
||||
"lodash": "4.17.4",
|
||||
"mute-stream": "0.0.7",
|
||||
"run-async": "2.3.0",
|
||||
"rx-lite": "4.0.8",
|
||||
"rx-lite-aggregates": "4.0.8",
|
||||
"string-width": "2.1.1",
|
||||
"strip-ansi": "4.0.0",
|
||||
"through": "2.3.8"
|
||||
}
|
||||
},
|
||||
"livereload-js": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/livereload-js/-/livereload-js-2.3.0.tgz",
|
||||
"integrity": "sha512-j1R0/FeGa64Y+NmqfZhyoVRzcFlOZ8sNlKzHjh4VvLULFACZhn68XrX5DFg2FhMvSMJmROuFxRSa560ECWKBMg==",
|
||||
"dev": true
|
||||
},
|
||||
"opn": {
|
||||
"version": "5.2.0",
|
||||
"resolved": "https://registry.npmjs.org/opn/-/opn-5.2.0.tgz",
|
||||
"integrity": "sha512-Jd/GpzPyHF4P2/aNOVmS3lfMSWV9J7cOhCG1s08XCEAsPkB7lp6ddiU0J7XzyQRDUh8BqJ7PchfINjR8jyofRQ==",
|
||||
"version": "5.3.0",
|
||||
"resolved": "https://registry.npmjs.org/opn/-/opn-5.3.0.tgz",
|
||||
"integrity": "sha512-bYJHo/LOmoTd+pfiYhfZDnf9zekVJrY+cnS2a5F2x+w5ppvTqObojTP7WiFG+kVZs9Inw+qQ/lw7TroWwhdd2g==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"is-wsl": "1.1.0"
|
||||
@ -957,16 +917,17 @@
|
||||
}
|
||||
},
|
||||
"tar": {
|
||||
"version": "4.4.0",
|
||||
"resolved": "https://registry.npmjs.org/tar/-/tar-4.4.0.tgz",
|
||||
"integrity": "sha512-gJlTiiErwo96K904FnoYWl+5+FBgS+FimU6GMh66XLdLa55al8+d4jeDfPoGwSNHdtWI5FJP6xurmVqhBuGJpQ==",
|
||||
"version": "4.4.1",
|
||||
"resolved": "https://registry.npmjs.org/tar/-/tar-4.4.1.tgz",
|
||||
"integrity": "sha512-O+v1r9yN4tOsvl90p5HAP4AEqbYhx4036AGMm075fH9F8Qwi3oJ+v4u50FkT/KkvywNGtwkk0zRI+8eYm1X/xg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"chownr": "1.0.1",
|
||||
"fs-minipass": "1.2.5",
|
||||
"minipass": "2.2.1",
|
||||
"minipass": "2.2.4",
|
||||
"minizlib": "1.1.0",
|
||||
"mkdirp": "0.5.1",
|
||||
"safe-buffer": "5.1.1",
|
||||
"yallist": "3.0.2"
|
||||
}
|
||||
},
|
||||
@ -2670,9 +2631,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"ci-info": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.1.2.tgz",
|
||||
"integrity": "sha512-uTGIPNx/nSpBdsF6xnseRXLLtfr9VLqkz8ZqHXr3Y7b6SftyRxBGjwMtJj1OhNbmlc1wZzLNAlAcvyIiE8a6ZA==",
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.1.3.tgz",
|
||||
"integrity": "sha512-SK/846h/Rcy8q9Z9CAwGBLfCJ6EkjJWdpelWDufQpqVDYq2Wnnv8zlSO6AMQap02jvhVruKKpEtQOufo3pFhLg==",
|
||||
"dev": true
|
||||
},
|
||||
"cipher-base": {
|
||||
@ -4826,9 +4787,9 @@
|
||||
}
|
||||
},
|
||||
"formidable": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/formidable/-/formidable-1.2.0.tgz",
|
||||
"integrity": "sha512-hr9aT30rAi7kf8Q2aaTpSP7xGMhlJ+MdrUDVZs3rxbD3L/K46A86s2VY7qC2D2kGYGBtiT/3j6wTx1eeUq5xAQ==",
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/formidable/-/formidable-1.2.1.tgz",
|
||||
"integrity": "sha512-Fs9VRguL0gqGHkXS5GQiMCr1VhZBxz0JnJs4JmMp/2jL18Fmbzvv7vOFRU+U8TBkHEE/CX1qDXzJplVULgsLeg==",
|
||||
"dev": true
|
||||
},
|
||||
"forwarded": {
|
||||
@ -4877,7 +4838,7 @@
|
||||
"integrity": "sha512-JhBl0skXjUPCFH7x6x61gQxrKyXsxB5gcgePLZCwfyCGGsTISMoIeObbrvVeP6Xmyaudw4TT43qV2Gz+iyd2oQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"minipass": "2.2.1"
|
||||
"minipass": "2.2.4"
|
||||
}
|
||||
},
|
||||
"fs-readdir-recursive": {
|
||||
@ -6722,15 +6683,15 @@
|
||||
"dev": true
|
||||
},
|
||||
"ionic": {
|
||||
"version": "3.19.1",
|
||||
"resolved": "https://registry.npmjs.org/ionic/-/ionic-3.19.1.tgz",
|
||||
"integrity": "sha512-U9flvol3qPaWGYkWouJGQJ3gzRflft5DmiOI8AKLjWMVhxU76O0VSZxKEdnfsNd02yGDcdwDPkhXh+LHobQLQw==",
|
||||
"version": "3.20.0",
|
||||
"resolved": "https://registry.npmjs.org/ionic/-/ionic-3.20.0.tgz",
|
||||
"integrity": "sha512-yeLPusYOSyF+VmO+Hf2a5kf2Kx4ST1f3MILM8g+9ckF/MdaoD9UzXif2/sumGem6I6RTrqo9horBmC7QJYcClA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@ionic/cli-framework": "0.1.2",
|
||||
"@ionic/cli-utils": "1.19.1",
|
||||
"@ionic/cli-framework": "0.1.3",
|
||||
"@ionic/cli-utils": "1.19.2",
|
||||
"chalk": "2.3.2",
|
||||
"opn": "5.2.0",
|
||||
"opn": "5.3.0",
|
||||
"semver": "5.4.1",
|
||||
"tslib": "1.9.0"
|
||||
},
|
||||
@ -6762,9 +6723,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"opn": {
|
||||
"version": "5.2.0",
|
||||
"resolved": "https://registry.npmjs.org/opn/-/opn-5.2.0.tgz",
|
||||
"integrity": "sha512-Jd/GpzPyHF4P2/aNOVmS3lfMSWV9J7cOhCG1s08XCEAsPkB7lp6ddiU0J7XzyQRDUh8BqJ7PchfINjR8jyofRQ==",
|
||||
"version": "5.3.0",
|
||||
"resolved": "https://registry.npmjs.org/opn/-/opn-5.3.0.tgz",
|
||||
"integrity": "sha512-bYJHo/LOmoTd+pfiYhfZDnf9zekVJrY+cnS2a5F2x+w5ppvTqObojTP7WiFG+kVZs9Inw+qQ/lw7TroWwhdd2g==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"is-wsl": "1.1.0"
|
||||
@ -8487,11 +8448,12 @@
|
||||
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ="
|
||||
},
|
||||
"minipass": {
|
||||
"version": "2.2.1",
|
||||
"resolved": "https://registry.npmjs.org/minipass/-/minipass-2.2.1.tgz",
|
||||
"integrity": "sha512-u1aUllxPJUI07cOqzR7reGmQxmCqlH88uIIsf6XZFEWgw7gXKpJdR+5R9Y3KEDmWYkdIz9wXZs3C0jOPxejk/Q==",
|
||||
"version": "2.2.4",
|
||||
"resolved": "https://registry.npmjs.org/minipass/-/minipass-2.2.4.tgz",
|
||||
"integrity": "sha512-hzXIWWet/BzWhYs2b+u7dRHlruXhwdgvlTMDKC6Cb1U7ps6Ac6yQlR39xsbjWJE377YTCtKwIXIpJ5oP+j5y8g==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"safe-buffer": "5.1.1",
|
||||
"yallist": "3.0.2"
|
||||
},
|
||||
"dependencies": {
|
||||
@ -8509,7 +8471,7 @@
|
||||
"integrity": "sha512-4T6Ur/GctZ27nHfpt9THOdRZNgyJ9FZchYO1ceg5S8Q3DNLCKYy44nCZzgCJgcvx2UM8czmqak5BCxJMrq37lA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"minipass": "2.2.1"
|
||||
"minipass": "2.2.4"
|
||||
}
|
||||
},
|
||||
"mixin-deep": {
|
||||
@ -12340,7 +12302,7 @@
|
||||
"debug": "3.1.0",
|
||||
"extend": "3.0.1",
|
||||
"form-data": "2.3.2",
|
||||
"formidable": "1.2.0",
|
||||
"formidable": "1.2.1",
|
||||
"methods": "1.1.2",
|
||||
"mime": "1.6.0",
|
||||
"qs": "6.5.1",
|
||||
|
||||
@ -46,7 +46,7 @@
|
||||
"@types/jasmine": "2.5.41",
|
||||
"@types/node": "7.0.4",
|
||||
"codecov": "2.2.0",
|
||||
"ionic": "3.19.1",
|
||||
"ionic": "3.20.0",
|
||||
"jasmine-core": "2.5.2",
|
||||
"jasmine-spec-reporter": "3.2.0",
|
||||
"karma": "1.4.1",
|
||||
@ -67,4 +67,4 @@
|
||||
"node": ">=8"
|
||||
},
|
||||
"license": "MIT"
|
||||
}
|
||||
}
|
||||
@ -5,7 +5,7 @@ import { IonicApp, IonicModule, IonicErrorHandler } from 'ionic-angular';
|
||||
import { StatusBar } from '@ionic-native/status-bar';
|
||||
import { SplashScreen } from '@ionic-native/splash-screen';
|
||||
import { InsightApp } from './app.component';
|
||||
import { PagesModule, HomePage, BlocksPage, BroadcastTxPage, NodeStatusPage, VerifyMessagePage } from '../pages';
|
||||
import { PagesModule, HomePage, BlocksPage, NodeStatusPage, VerifyMessagePage } from '../pages';
|
||||
import { BlocksService, StorageService } from '../services';
|
||||
import { ApiProvider } from '../providers/api/api';
|
||||
import { CurrencyProvider } from '../providers/currency/currency';
|
||||
@ -26,7 +26,6 @@ import { BlocksProvider } from '../providers/blocks/blocks';
|
||||
InsightApp,
|
||||
HomePage,
|
||||
BlocksPage,
|
||||
BroadcastTxPage,
|
||||
NodeStatusPage,
|
||||
VerifyMessagePage
|
||||
],
|
||||
|
||||
14
app/src/assets/img/currency_logos/bch.svg
Normal file
14
app/src/assets/img/currency_logos/bch.svg
Normal file
@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="49px" height="30px" viewBox="0 0 49 30" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- Generator: Sketch 46.2 (44496) - http://www.bohemiancoding.com/sketch -->
|
||||
<title>cash</title>
|
||||
<desc>Created with Sketch.</desc>
|
||||
<defs></defs>
|
||||
<g id="Symbols" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="Invoice---Details---toggle-13" transform="translate(-15.000000, -66.000000)" fill-rule="nonzero" fill="#70C559">
|
||||
<g id="cash" transform="translate(15.000000, 66.000000)">
|
||||
<path d="M13.8417063,-9.23705556e-14 C10.3638666,2.45824779 7.71855988,6.11178429 6.60498615,10.5439372 C4.70445891,18.0998581 7.80802299,25.7315444 13.8323317,30 L0,30 L0,6.67235157e-12 L13.8417063,6.67174941e-12 L13.8417063,-9.23705556e-14 Z M35.4255188,2.16006456e-11 L49,2.16000551e-11 L49,30 L35.4177702,30 C38.8953546,27.5421934 41.5405004,23.8894637 42.6545185,19.458134 C44.5543534,11.900549 41.4505764,4.26854241 35.4255188,2.1236346e-11 L35.4255188,2.16006456e-11 Z M39.3004107,18.6286839 C37.2802686,26.6643836 29.0735016,31.5548028 20.9697739,29.5509168 C12.8693548,27.5474997 7.93811007,19.4082073 9.95919725,11.3729763 C11.9783938,3.33633912 20.185161,-1.55454875 28.2865254,0.448868418 C36.3897804,2.45228559 41.3205524,10.5925155 39.3004107,18.6286839 Z M25.404827,8.31840135 L24.822017,5.61021006 L23.1646362,5.95837059 L23.7321322,8.59517337 C23.2964321,8.68671195 22.8528909,8.78878287 22.412286,8.89047021 L21.8413778,6.23613729 L20.1848384,6.58389075 L20.7668159,9.29144802 C20.4095444,9.37407702 20.0585751,9.45469416 19.7150084,9.52706466 L17.4268281,9.99789864 L17.8061139,11.7584155 C17.8061139,11.7584155 19.0250623,11.4782322 19.0095416,11.5049211 C19.6809284,11.3641687 19.9828396,11.7059324 20.1183742,12.0270932 L21.7146405,19.4461225 C21.7303963,19.6624491 21.6782983,20.0235742 21.2094313,20.1228629 C21.2346595,20.1370971 20.0045444,20.375508 20.0045444,20.375508 L20.0988542,22.4133317 L22.2557355,21.9603946 C22.6572213,21.8765944 23.053614,21.8004421 23.44186,21.7214914 L24.0319506,24.4603751 L25.6876485,24.1130287 L25.1044355,21.4029588 C25.5610391,21.31686 26.0017437,21.2280845 26.4311504,21.1375167 L27.0109069,23.835262 L28.6682877,23.4871014 L28.0804623,20.7528244 C30.8327059,20.0087698 32.6327287,18.9010983 32.3148875,16.247723 C32.0594765,14.1110581 30.8671217,13.3840872 29.2040862,13.3384078 C30.0603063,12.6499773 30.4765778,11.6663412 30.0286414,10.2671807 C29.4197843,8.35437249 27.5843909,8.05563042 25.404827,8.31840135 Z M28.8925748,16.4400896 C29.3339492,18.4867945 25.7599728,18.9938427 24.6369247,19.2307446 L23.8564384,15.6015987 C24.9801043,15.3659532 28.4333066,14.3051001 28.8925748,16.4400896 Z M23.3654016,14.0925774 L22.6572494,10.8011688 C23.5928708,10.6046501 26.4682721,9.69163557 26.886443,11.6339622 C27.2866494,13.4963329 24.3010229,13.8960587 23.3654016,14.0925774 Z" id="Cash"></path>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.0 KiB |
15
app/src/assets/img/currency_logos/btc.svg
Normal file
15
app/src/assets/img/currency_logos/btc.svg
Normal file
@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="30px" height="30px" viewBox="0 0 30 30" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- Generator: Sketch 46.2 (44496) - http://www.bohemiancoding.com/sketch -->
|
||||
<title>bitcoin</title>
|
||||
<desc>Created with Sketch.</desc>
|
||||
<defs></defs>
|
||||
<g id="Symbols" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="Invoice---Details---toggle-12" transform="translate(-14.000000, -65.000000)" fill-rule="nonzero">
|
||||
<g id="bitcoin" transform="translate(14.000000, 65.000000)">
|
||||
<path d="M29.488125,18.7144615 C27.4907812,26.6007692 19.3776562,31.4141538 11.3475,29.448 C3.3384375,27.4813846 -1.550625,19.4930769 0.44671875,11.6067692 C2.44359375,3.72092308 10.5571875,-1.09246154 18.56625,0.873692308 C26.5964062,2.81953846 31.485,10.8286154 29.488125,18.7144615" id="Shape" fill="#F8AE2A"></path>
|
||||
<path d="M18.8160938,13.2456923 C18.3792187,15.0687692 15.508125,14.1876923 14.5720313,13.9624615 L15.3628125,10.7261538 C16.2778125,10.9513846 19.2735937,11.3409231 18.8160937,13.2456923 L18.8160938,13.2456923 Z M18.358125,18.4689231 C17.88,20.4761538 14.42625,19.4316923 13.32375,19.1653846 L14.176875,15.6013846 C15.3,15.8676923 18.8573438,16.3592308 18.358125,18.4689231 Z M22.06125,13.2456923 C22.3317187,11.2790769 20.8129687,10.2549231 18.7326562,9.55846154 L19.3776562,6.89584615 L17.7342188,6.50676923 L17.1103125,9.108 C16.6734375,9.00553846 16.2365625,8.90307692 15.7996875,8.82138462 L16.4235937,6.21969231 L14.7595313,5.83061538 L14.1145313,8.49369231 C13.760625,8.41153846 13.4071875,8.35015385 13.0532813,8.268 L10.7859375,7.73584615 L10.3696875,9.45646154 C10.3696875,9.45646154 11.5973438,9.72230769 11.555625,9.74307692 C12.22125,9.90692308 12.3459375,10.3370769 12.3253125,10.6647692 L11.5973438,13.6961538 C11.6385938,13.7169231 11.7014063,13.7169231 11.76375,13.7575385 C11.7014063,13.7372308 11.6596875,13.7372308 11.5973438,13.7169231 L10.5984375,17.9566154 C10.5154688,18.1615385 10.3073438,18.4481538 9.84984375,18.3461538 C9.87046875,18.3664615 8.64328125,18.0590769 8.64328125,18.0590769 L7.8525,19.9232308 L9.99515625,20.4147692 C10.3907812,20.5172308 10.7859375,20.5989231 11.1604687,20.7013846 L10.5154688,23.3847692 L12.1589062,23.7738462 L12.8039062,21.1112308 C13.2614063,21.234 13.6982813,21.3364615 14.1145312,21.4389231 L13.4695312,24.0812308 L15.1129687,24.4703077 L15.7579687,21.7873846 C18.56625,22.2789231 20.6671875,22.0532308 21.5203125,19.5341538 C22.2070312,17.5264615 21.4579687,16.3795385 19.9603125,15.6216923 C21.0628125,15.3756923 21.853125,14.6796923 22.06125,13.2456923 L22.06125,13.2456923 Z" id="Shape" fill="#FFFFFF"></path>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.7 KiB |
16
app/src/assets/img/currency_logos/ltc.svg
Normal file
16
app/src/assets/img/currency_logos/ltc.svg
Normal file
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="30px" height="30px" viewBox="0 0 30 30" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- Generator: Sketch 46.2 (44496) - http://www.bohemiancoding.com/sketch -->
|
||||
<title>litecoin</title>
|
||||
<desc>Created with Sketch.</desc>
|
||||
<defs></defs>
|
||||
<g id="Exploration" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="select-currency" transform="translate(-135.000000, -516.000000)" fill-rule="nonzero" fill="#BEBEBE">
|
||||
<g id="LTC" transform="translate(135.000000, 514.000000)">
|
||||
<g id="litecoin" transform="translate(0.000000, 2.000000)">
|
||||
<path d="M14.9978166,0.0793957695 C6.7571516,0.0793957695 0.076944392,6.75969362 0.076944392,15.0002674 C0.076944392,23.240932 6.7571516,29.9213166 14.9978166,29.9213166 C23.2383906,29.9213166 29.9186882,23.240932 29.9186882,15.0002674 C29.9186882,6.75969362 23.2383,0.0793957695 14.9978166,0.0793957695 Z M12.6942498,6.99841486 L17.3093483,6.99841486 L15.6819997,13.1259761 L17.9406036,12.3008837 L17.9600755,12.35399 L17.3893613,14.4987689 L15.0948236,15.3369607 L14.1258136,18.986236 L21.793452,18.986236 L21.0060653,21.9194637 L8.72315148,21.9194637 L9.97751782,17.2066495 L8.20200344,17.8552523 L8.78918003,15.6440909 L10.5659338,14.9949571 L12.6942498,6.99841486 Z" id="Fill-1"></path>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.4 KiB |
@ -1,4 +1,15 @@
|
||||
<ion-list radio-group [(ngModel)]="currency.currencySymbol" (ionChange)="currency.setCurrency(currency.currencySymbol)">
|
||||
<ion-list radio-group [(ngModel)]="currencyProvider.currencySymbol" (ionChange)="currencyProvider.setCurrency(currencyProvider.currencySymbol)">
|
||||
<ion-list-header *ngIf="switcherOn">
|
||||
Blockchain
|
||||
</ion-list-header>
|
||||
|
||||
<ion-row *ngIf="switcherOn">
|
||||
<ion-col *ngFor="let explorer of currencyProvider.explorers">
|
||||
<button (click)="changeExplorer(explorer)" ion-item detail-none class="text-button" text-center>
|
||||
<img src="assets/img/currency_logos/{{ explorer.ticker.toLowerCase() }}.svg" class="logo"/></button>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
|
||||
<ion-list-header>
|
||||
Units
|
||||
</ion-list-header>
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { CurrencyProvider } from '../../providers/currency/currency';
|
||||
import { ViewController } from 'ionic-angular';
|
||||
import { Http } from '@angular/http';
|
||||
import { ApiProvider } from '../../providers/api/api';
|
||||
|
||||
@Component({
|
||||
selector: 'denomination',
|
||||
@ -8,24 +10,32 @@ import { ViewController } from 'ionic-angular';
|
||||
})
|
||||
export class DenominationComponent {
|
||||
|
||||
public text: string;
|
||||
public switcherOn: boolean;
|
||||
public units: any = [];
|
||||
|
||||
constructor(
|
||||
public currency: CurrencyProvider,
|
||||
public viewCtrl: ViewController
|
||||
public currencyProvider: CurrencyProvider,
|
||||
public viewCtrl: ViewController,
|
||||
public http: Http,
|
||||
public api: ApiProvider
|
||||
) {
|
||||
this.text = 'Hello World';
|
||||
this.units = [
|
||||
'USD',
|
||||
this.currency.defaultCurrency,
|
||||
'm' + this.currency.defaultCurrency,
|
||||
this.currencyProvider.defaultCurrency,
|
||||
'm' + this.currencyProvider.defaultCurrency,
|
||||
'bits'
|
||||
];
|
||||
|
||||
this.switcherOn = currencyProvider.explorers.length > 1;
|
||||
}
|
||||
|
||||
public close(): void {
|
||||
this.viewCtrl.dismiss();
|
||||
}
|
||||
|
||||
public changeExplorer(explorer: any): void {
|
||||
this.close();
|
||||
let theUrl: string = explorer.url;
|
||||
window.location.href = theUrl;
|
||||
}
|
||||
}
|
||||
|
||||
@ -112,43 +112,6 @@ export class HeadNavComponent {
|
||||
/* tslint:enable:no-unused-variable */
|
||||
|
||||
public changeCurrency(myEvent: any): void {
|
||||
/*
|
||||
let actionSheet: any = this.actionSheetCtrl.create({
|
||||
title: 'Change Denomination',
|
||||
buttons: [
|
||||
{
|
||||
text: 'USD',
|
||||
handler: () => {
|
||||
this.currency.setCurrency('USD');
|
||||
}
|
||||
},
|
||||
{
|
||||
text: this.currency.defaultCurrency,
|
||||
handler: () => {
|
||||
this.currency.setCurrency(this.currency.defaultCurrency);
|
||||
}
|
||||
},
|
||||
{
|
||||
text: 'm' + this.currency.defaultCurrency,
|
||||
handler: () => {
|
||||
this.currency.setCurrency('m' + this.currency.defaultCurrency);
|
||||
}
|
||||
},
|
||||
{
|
||||
text: 'bits',
|
||||
handler: () => {
|
||||
this.currency.setCurrency('bits');
|
||||
}
|
||||
},
|
||||
{
|
||||
text: 'Cancel',
|
||||
role: 'cancel'
|
||||
}
|
||||
]
|
||||
});
|
||||
actionSheet.present();
|
||||
*/
|
||||
|
||||
let popover: any = this.popoverCtrl.create(DenominationComponent);
|
||||
popover.present({
|
||||
ev: myEvent
|
||||
|
||||
33
app/src/pages/broadcast-tx/broadcast-tx.html
Normal file
33
app/src/pages/broadcast-tx/broadcast-tx.html
Normal file
@ -0,0 +1,33 @@
|
||||
<ion-header>
|
||||
<ion-navbar color="brand">
|
||||
<button ion-button menuToggle>
|
||||
<ion-icon name="menu"></ion-icon>
|
||||
</button>
|
||||
<ion-title>{{title}}</ion-title>
|
||||
</ion-navbar>
|
||||
</ion-header>
|
||||
|
||||
<ion-content padding>
|
||||
<div class="page-content">
|
||||
<form [formGroup]="txForm">
|
||||
<ion-list>
|
||||
<ion-item>
|
||||
<p>This form can be used to broadcast a raw transaction in hex format over the Bitcoin network.</p>
|
||||
</ion-item>
|
||||
|
||||
<ion-item>
|
||||
<ion-label floating>Raw transaction data</ion-label>
|
||||
<ion-input type="text" [(ngModel)]="transaction" formControlName="rawData"></ion-input>
|
||||
</ion-item>
|
||||
|
||||
<ion-item *ngIf="!txForm.controls.rawData.valid">
|
||||
<p>Raw transaction data must be a valid hexadecimal string.</p>
|
||||
</ion-item>
|
||||
|
||||
<ion-item>
|
||||
<button ion-button outline (click)="send()" [disabled]="!txForm.touched || !txForm.valid">Send transaction</button>
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
</form>
|
||||
</div>
|
||||
</ion-content>
|
||||
16
app/src/pages/broadcast-tx/broadcast-tx.module.ts
Normal file
16
app/src/pages/broadcast-tx/broadcast-tx.module.ts
Normal file
@ -0,0 +1,16 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { IonicPageModule } from 'ionic-angular';
|
||||
import { BroadcastTxPage } from './broadcast-tx';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
BroadcastTxPage
|
||||
],
|
||||
imports: [
|
||||
IonicPageModule.forChild(BroadcastTxPage)
|
||||
],
|
||||
exports: [
|
||||
BroadcastTxPage
|
||||
]
|
||||
})
|
||||
export class BroadcastTxPageModule {}
|
||||
3
app/src/pages/broadcast-tx/broadcast-tx.scss
Normal file
3
app/src/pages/broadcast-tx/broadcast-tx.scss
Normal file
@ -0,0 +1,3 @@
|
||||
page-broadcast-tx {
|
||||
|
||||
}
|
||||
64
app/src/pages/broadcast-tx/broadcast-tx.ts
Normal file
64
app/src/pages/broadcast-tx/broadcast-tx.ts
Normal file
@ -0,0 +1,64 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { IonicPage } from 'ionic-angular';
|
||||
import { ToastController } from 'ionic-angular';
|
||||
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||
import { Http } from '@angular/http';
|
||||
import { ApiProvider } from '../../providers/api/api';
|
||||
|
||||
@IonicPage()
|
||||
@Component({
|
||||
selector: 'page-broadcast-tx',
|
||||
templateUrl: 'broadcast-tx.html'
|
||||
})
|
||||
export class BroadcastTxPage {
|
||||
|
||||
public title: string;
|
||||
public transaction: string;
|
||||
public txForm: FormGroup;
|
||||
private status: string;
|
||||
private toast: any;
|
||||
|
||||
constructor(
|
||||
private toastCtrl: ToastController,
|
||||
public formBuilder: FormBuilder,
|
||||
private http: Http,
|
||||
private api: ApiProvider,
|
||||
) {
|
||||
this.title = 'Broadcast Transaction';
|
||||
this.txForm = formBuilder.group({
|
||||
rawData: ['', Validators.pattern(/^[0-9A-Fa-f]+$/)]
|
||||
});
|
||||
}
|
||||
|
||||
public send(): void {
|
||||
let postData: any = {
|
||||
rawtx: this.transaction
|
||||
};
|
||||
this.status = 'loading';
|
||||
|
||||
this.http.post(this.api.apiPrefix + 'tx/send', postData)
|
||||
.subscribe(
|
||||
response => {
|
||||
this.presentToast(true, response);
|
||||
},
|
||||
err => {
|
||||
this.presentToast(false, err);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
private presentToast(success: boolean, response: any): void {
|
||||
let message: string = (success) ? 'Transaction successfully broadcast. Trasaction id: ' + JSON.parse(response._body).txid : 'An error occurred: ' + response._body;
|
||||
if (this.toast) {
|
||||
this.toast.dismiss();
|
||||
}
|
||||
|
||||
this.toast = this.toastCtrl.create({
|
||||
message: message,
|
||||
position: 'middle',
|
||||
showCloseButton: true,
|
||||
dismissOnPageChange: true
|
||||
});
|
||||
this.toast.present();
|
||||
}
|
||||
}
|
||||
@ -1,6 +1,6 @@
|
||||
export * from './broadcastTxPage/broadcastTxPage';
|
||||
export * from './nodeStatusPage/nodeStatusPage';
|
||||
export * from './verifyMessagePage/verifyMessagePage';
|
||||
export * from './home/home';
|
||||
export * from './blocks/blocks';
|
||||
export * from './broadcast-tx/broadcast-tx';
|
||||
export * from './pages.module';
|
||||
|
||||
@ -2,12 +2,12 @@ import { NgModule } from '@angular/core';
|
||||
import { IonicModule } from 'ionic-angular';
|
||||
import { ComponentsModule } from '../components';
|
||||
import { BlocksPageModule } from '../pages/blocks/blocks.module';
|
||||
import { BroadcastTxPageModule } from './broadcast-tx/broadcast-tx.module';
|
||||
import { HeadNavComponentModule } from '../components/head-nav/head-nav.module';
|
||||
import { LatestTransactionsComponentModule } from '../components/latest-transactions/latest-transactions.module';
|
||||
import { LatestBlocksComponentModule } from '../components/latest-blocks/latest-blocks.module';
|
||||
import {
|
||||
HomePage,
|
||||
BroadcastTxPage,
|
||||
NodeStatusPage,
|
||||
VerifyMessagePage
|
||||
} from './index';
|
||||
@ -15,7 +15,6 @@ import {
|
||||
@NgModule({
|
||||
declarations: [
|
||||
HomePage,
|
||||
BroadcastTxPage,
|
||||
NodeStatusPage,
|
||||
VerifyMessagePage
|
||||
],
|
||||
@ -23,6 +22,7 @@ import {
|
||||
IonicModule,
|
||||
ComponentsModule,
|
||||
BlocksPageModule,
|
||||
BroadcastTxPageModule,
|
||||
HeadNavComponentModule,
|
||||
LatestTransactionsComponentModule,
|
||||
LatestBlocksComponentModule
|
||||
|
||||
@ -11,9 +11,11 @@ import 'rxjs/add/operator/map';
|
||||
@Injectable()
|
||||
export class ApiProvider {
|
||||
|
||||
public apiPrefix: string = '/insight-api/';
|
||||
public apiPrefix: string;
|
||||
|
||||
constructor(public http: Http) {
|
||||
// TODO Make this an API call
|
||||
this.apiPrefix = '/api/';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -18,10 +18,24 @@ export class CurrencyProvider {
|
||||
private bitstamp: number;
|
||||
private kraken: number;
|
||||
private loading: boolean;
|
||||
public explorers: any = [];
|
||||
|
||||
constructor(public http: Http, private api: ApiProvider) {
|
||||
// TODO Make this an API call
|
||||
this.defaultCurrency = 'BTC';
|
||||
this.currencySymbol = this.defaultCurrency;
|
||||
|
||||
let url: string = this.api.apiPrefix + 'explorers';
|
||||
console.log('exploers url is', url);
|
||||
this.http.get(url).subscribe(
|
||||
(data) => {
|
||||
console.log('', data);
|
||||
this.explorers = JSON.parse(data['_body']);
|
||||
},
|
||||
(err) => {
|
||||
console.error('err', err);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
public roundFloat(aFloat: number, decimalPlaces: number): number {
|
||||
@ -89,8 +103,8 @@ export class CurrencyProvider {
|
||||
this.loading = false;
|
||||
},
|
||||
(err) => {
|
||||
console.log('err is', err);
|
||||
this.loading = false;
|
||||
console.error('err getting currency', err);
|
||||
}
|
||||
);
|
||||
} else if (currency === 'm' + this.defaultCurrency) {
|
||||
|
||||
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "insight",
|
||||
"name": "insight-ui",
|
||||
"version": "1.0.0",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "insight",
|
||||
"name": "insight-ui",
|
||||
"description": "A bitcoin block explorer and API.",
|
||||
"version": "1.0.0",
|
||||
"repository": "git://github.com/bitpay/insight.git",
|
||||
@ -10,6 +10,7 @@
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
"insight",
|
||||
"insight-ui",
|
||||
"blockchain",
|
||||
"block explorer",
|
||||
"bitcoin",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user