File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 15491549 if ( ! witness_used . includes ( y ) ) {
15501550 var sw = coinjs . segwitAddress ( this . witness [ y ] [ 1 ] ) ;
15511551 var b32 = coinjs . bech32Address ( this . witness [ y ] [ 1 ] ) ;
1552- if ( this . ins [ i ] . script . chunks . length > 0 ) {
1553- if ( ( sw [ 'redeemscript' ] == Crypto . util . bytesToHex ( this . ins [ i ] . script . chunks [ 0 ] ) ) || ( b32 [ 'redeemscript' ] == Crypto . util . bytesToHex ( this . ins [ i ] . script . chunks [ 0 ] ) ) ) {
1554- witness_order . push ( this . witness [ y ] ) ;
1555- witness_used . push ( y ) ;
1556- if ( b32 [ 'redeemscript' ] == Crypto . util . bytesToHex ( this . ins [ i ] . script . chunks [ 0 ] ) ) {
1557- this . ins [ index ] . script = coinjs . script ( ) ;
1558- }
1559- break ;
1552+ var rs = '' ;
1553+
1554+ if ( this . ins [ i ] . script . chunks . length >= 1 ) {
1555+ rs = Crypto . util . bytesToHex ( this . ins [ i ] . script . chunks [ 0 ] ) ;
1556+ } else if ( this . ins [ i ] . script . chunks . length == 0 ) {
1557+ rs = b32 [ 'redeemscript' ] ;
1558+ }
1559+
1560+ if ( ( sw [ 'redeemscript' ] == rs ) || ( b32 [ 'redeemscript' ] == rs ) ) {
1561+ witness_order . push ( this . witness [ y ] ) ;
1562+ witness_used . push ( y ) ;
1563+
1564+ // bech32, empty redeemscript
1565+ if ( b32 [ 'redeemscript' ] == rs ) {
1566+ this . ins [ index ] . script = coinjs . script ( ) ;
15601567 }
1568+ break ;
15611569 }
15621570 }
15631571 }
15641572 }
1573+
15651574 this . witness = witness_order ;
15661575 }
15671576 }
Original file line number Diff line number Diff line change 1- ---- Version 1.4 2018.06.17 ---
1+ ---- Version 1.4 2018.06.19 ---
2277e4519962e2f6a9fc93342137dbb31c33b76b04 ./js/aes.js
333a09a8fc0cfe828b57fc798d668234d0490ee1a6 ./js/bootstrap-datetimepicker.min.js
44253711c6d825de55a8360552573be950da180614 ./js/bootstrap.min.js
55988f99187ab356bc5d12b61572f463e1785c15c2 ./js/coinbin.js
6- 776a3e2ae1e5835cf0c290987ac5343d8f57ad73 ./js/coin.js
6+ 8b4163122d907f9c363b9afd8809490f5ba202c8 ./js/coin.js
77988565bc2cb402d63ed5c5fd7ff47c4278efc2c5 ./js/collapse.js
889ba5ede3d7f9d4c8fd623395f196adfdcf7e970f ./js/crypto-min.js
99f7c09f2f5a721371e7d478050119f7e2d58e3ef9 ./js/crypto-sha256-hmac.js
You can’t perform that action at this time.
0 commit comments