File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -619,7 +619,7 @@ export default class Binance {
619619 const query = method === 'POST' && noDataInSignature ? '' : this . makeQueryString ( data ) ;
620620
621621 const signature = this . generateSignature ( query ) ;
622-
622+
623623 if ( method === 'POST' ) {
624624 const opt = this . reqObjPOST (
625625 url ,
@@ -659,17 +659,12 @@ export default class Binance {
659659
660660 if ( secret . length > 120 ) {
661661 // RSA key
662- // const signed = createSign('RSA-SHA256').update(query);
663662 signature = crypto
664663 . sign ( 'RSA-SHA256' , Buffer . from ( query ) , keyObject )
665664 . toString ( 'base64' ) ;
666665 signature = encodeURIComponent ( signature ) ;
667666 } else {
668667 // Ed25519 key
669- // const privateKey = new Uint8Array (base64.decode (secret).slice (16));
670- // const encodedQuery = new TextEncoder().encode(query);
671- // const signatureInit = ed25519.sign (encodedQuery, privateKey);
672- // signature = base64.encode (signatureInit);
673668 signature = crypto . sign ( null , Buffer . from ( query ) , keyObject ) . toString ( 'base64' ) ;
674669 }
675670 } else {
You can’t perform that action at this time.
0 commit comments