Skip to content

Commit

Permalink
hotfix: start date multisig (#1123)
Browse files Browse the repository at this point in the history
* fix: startdate

Signed-off-by: Mario Francia <[email protected]>

* fix: startdate

Signed-off-by: Mario Francia <[email protected]>

---------

Signed-off-by: Mario Francia <[email protected]>
  • Loading branch information
M-Francia committed May 14, 2024
1 parent 21509f8 commit 8384316
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 14 deletions.
14 changes: 5 additions & 9 deletions sdk/src/port/out/hs/HederaTransactionAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1402,15 +1402,11 @@ export abstract class HederaTransactionAdapter extends TransactionAdapter {
abstract getAccount(): Account;

abstract signAndSendTransaction(
...args:
| [t: Transaction, startDate?: string]
| [
t: Transaction,
transactionType: TransactionType,
nameFunction?: string,
abi?: any[],
startDate?: string,
]
t: Transaction,
transactionType: TransactionType,
nameFunction?: string,
abi?: any[],
startDate?: string,
): Promise<TransactionResponse>;

abstract sign(message: string | Transaction): Promise<string>;
Expand Down
11 changes: 6 additions & 5 deletions sdk/src/port/out/hs/multiSig/MultiSigTransactionAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ import {
import EventService from '../../../../app/service/event/EventService.js';
import Hex from '../../../../core/Hex.js';
import TransactionService from '../../../../app/service/TransactionService.js';
import { TransactionType } from '../../TransactionResponseEnums';

@singleton()
export class MultiSigTransactionAdapter extends HederaTransactionAdapter {
Expand All @@ -69,17 +70,17 @@ export class MultiSigTransactionAdapter extends HederaTransactionAdapter {

async signAndSendTransaction(
t: Transaction,
startDate?: string, // TODO: instead of this could we retrieve this from backend using a service?
): // eslint-disable-next-line @typescript-eslint/no-explicit-any
Promise<TransactionResponse<any, Error>> {
transactionType: TransactionType,
nameFunction?: string,
abi?: never[],
startDate?: string,
): Promise<TransactionResponse<never, Error>> {
const publicKeys: string[] = [];

const accountId: AccountId = AccountId.fromString(
this.account.id.toString(),
);

// Generate a new transaction ID
// TODO: Replace this date with the date selected in the UI
const dateStr = startDate ? startDate : new Date().toISOString();

const validStart = Timestamp.fromDate(dateStr);
Expand Down

0 comments on commit 8384316

Please sign in to comment.