File tree Expand file tree Collapse file tree 4 files changed +6
-4
lines changed
Expand file tree Collapse file tree 4 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -174,7 +174,10 @@ export abstract class Transaction extends BaseTransaction {
174174
175175 const feePayerAuthenticator = authenticator . fee_payer . authenticator as AccountAuthenticatorEd25519 ;
176176 const feePayerSignature = Buffer . from ( feePayerAuthenticator . signature . toUint8Array ( ) ) ;
177- this . addFeePayerSignature ( { pub : feePayerAuthenticator . public_key . toString ( ) } , feePayerSignature ) ;
177+ this . addFeePayerSignature (
178+ { pub : utils . stripHexPrefix ( feePayerAuthenticator . public_key . toString ( ) ) } ,
179+ feePayerSignature
180+ ) ;
178181 } catch ( e ) {
179182 console . error ( 'invalid signed transaction' , e ) ;
180183 throw new Error ( 'invalid signed transaction' ) ;
Original file line number Diff line number Diff line change @@ -43,7 +43,6 @@ export class Utils implements BaseUtils {
4343
4444 /** @inheritdoc */
4545 isValidPublicKey ( key : string ) : boolean {
46- key = this . stripHexPrefix ( key ) ;
4746 return isValidEd25519PublicKey ( key ) ;
4847 }
4948
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ describe('APT:', function () {
6666
6767 it ( 'is valid pub' , function ( ) {
6868 // with 0x prefix
69- basecoin . isValidPub ( '0x9b4e96086d111500259f9b38680b0509a405c1904da18976455a20c691d3bb07' ) . should . equal ( true ) ;
69+ basecoin . isValidPub ( '0x9b4e96086d111500259f9b38680b0509a405c1904da18976455a20c691d3bb07' ) . should . equal ( false ) ;
7070 // without 0x prefix
7171 basecoin . isValidPub ( '9b4e96086d111500259f9b38680b0509a405c1904da18976455a20c691d3bb07' ) . should . equal ( true ) ;
7272 } ) ;
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ describe('Aptos util library', function () {
4444
4545 it ( 'is valid public key' , function ( ) {
4646 // with 0x prefix
47- should . equal ( true , utils . isValidPublicKey ( '0x9b4e96086d111500259f9b38680b0509a405c1904da18976455a20c691d3bb07' ) ) ;
47+ should . equal ( false , utils . isValidPublicKey ( '0x9b4e96086d111500259f9b38680b0509a405c1904da18976455a20c691d3bb07' ) ) ;
4848 // without 0x prefix
4949 should . equal ( true , utils . isValidPublicKey ( '9b4e96086d111500259f9b38680b0509a405c1904da18976455a20c691d3bb07' ) ) ;
5050 } ) ;
You can’t perform that action at this time.
0 commit comments