Skip to content
This repository has been archived by the owner on Nov 23, 2023. It is now read-only.

Commit

Permalink
remove comments and change flowtype on "signTx"
Browse files Browse the repository at this point in the history
  • Loading branch information
szymonlesisz committed Sep 7, 2018
1 parent 5f612b0 commit 2de09e5
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/js/core/methods/TezosSignTransaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,12 @@ import type { TezosTransaction, TezosSignedTx } from '../../types/trezor';
import type { TezosCurve, TezosOperation, $TezosSignTransaction } from '../../types/tezos';
import type { CoreMessage } from '../../types';

type Params = {
transaction: TezosTransaction,
}

export default class TezosSignTransaction extends AbstractMethod {
message: $TezosSignTransaction // change type
params: Params;

constructor(message: CoreMessage) {
super(message);
Expand All @@ -33,26 +37,22 @@ export default class TezosSignTransaction extends AbstractMethod {
const curve: TezosCurve = payload.curve;
const branch: Array<number> = payload.branch;
const operation: TezosOperation = payload.operation;
const transaction = helper.createTx(path, curve, branch, operation);

this.message = helper.createTx(path, curve, branch, operation);

//console.warn('[TezosSignTransaction][constructor]', message)
this.params = {
transaction,
}
}

async run(): Promise<TezosSignedTx> {

//console.warn('[y][TezosSignTransaction] run request ', this.message)

const response: TezosSignedTx = await this.device.getCommands().tezosSignTransaction(
this.message,
this.params.transaction,
);
//console.warn('[y][TezosSignTransaction] run response ', response)

return {
signature: response.signature,
sig_op_contents: response.sig_op_contents,
operation_hash: response.operation_hash,
}

}
}
}

0 comments on commit 2de09e5

Please sign in to comment.