File tree 2 files changed +24
-1
lines changed
2 files changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -1023,6 +1023,29 @@ $(document).ready(function() {
1023
1023
// broadcast transaction vai coinbin (default)
1024
1024
function rawSubmitDefault ( btn ) {
1025
1025
var thisbtn = btn ;
1026
+ $ ( thisbtn ) . val ( 'Please wait, loading...' ) . attr ( 'disabled' , true ) ;
1027
+ $ . ajax ( {
1028
+ type : "POST" ,
1029
+ url : coinjs . host + '?uid=' + coinjs . uid + '&key=' + coinjs . key + '&setmodule=bitcoin&request=sendrawtransaction' ,
1030
+ data : { 'rawtx' :$ ( "#rawTransaction" ) . val ( ) } ,
1031
+ dataType : "xml" ,
1032
+ error : function ( data ) {
1033
+ $ ( "#rawTransactionStatus" ) . addClass ( 'alert-danger' ) . removeClass ( 'alert-success' ) . removeClass ( "hidden" ) . html ( " There was an error submitting your request, please try again" ) . prepend ( '<span class="glyphicon glyphicon-exclamation-sign"></span>' ) ;
1034
+ } ,
1035
+ success : function ( data ) {
1036
+ $ ( "#rawTransactionStatus" ) . html ( unescape ( $ ( data ) . find ( "response" ) . text ( ) ) . replace ( / \+ / g, ' ' ) ) . removeClass ( 'hidden' ) ;
1037
+ if ( $ ( data ) . find ( "result" ) . text ( ) == 1 ) {
1038
+ $ ( "#rawTransactionStatus" ) . addClass ( 'alert-success' ) . removeClass ( 'alert-danger' ) ;
1039
+ $ ( "#rawTransactionStatus" ) . html ( 'txid: ' + $ ( data ) . find ( "txid" ) . text ( ) ) ;
1040
+ } else {
1041
+ $ ( "#rawTransactionStatus" ) . addClass ( 'alert-danger' ) . removeClass ( 'alert-success' ) . prepend ( '<span class="glyphicon glyphicon-exclamation-sign"></span> ' ) ;
1042
+ }
1043
+ } ,
1044
+ complete : function ( data , status ) {
1045
+ $ ( "#rawTransactionStatus" ) . fadeOut ( ) . fadeIn ( ) ;
1046
+ $ ( thisbtn ) . val ( 'Submit' ) . attr ( 'disabled' , false ) ;
1047
+ }
1048
+ } ) ;
1026
1049
}
1027
1050
1028
1051
// broadcast transaction via cryptoid
Original file line number Diff line number Diff line change 2
2
77e4519962e2f6a9fc93342137dbb31c33b76b04 ./js/aes.js
3
3
3a09a8fc0cfe828b57fc798d668234d0490ee1a6 ./js/bootstrap-datetimepicker.min.js
4
4
253711c6d825de55a8360552573be950da180614 ./js/bootstrap.min.js
5
- b4389c2eed22172cbe762a44fa0081d1a7bb2da8 ./js/coinbin.js
5
+ 85253592724bd5176a3048dfaa03bd367f13de1f ./js/coinbin.js
6
6
b9af8c7b34429b0513972107d9b22b84e9d4fc8a ./js/coin.js
7
7
988565bc2cb402d63ed5c5fd7ff47c4278efc2c5 ./js/collapse.js
8
8
9ba5ede3d7f9d4c8fd623395f196adfdcf7e970f ./js/crypto-min.js
You can’t perform that action at this time.
0 commit comments