Skip to content

Commit

Permalink
Update network in task on chain
Browse files Browse the repository at this point in the history
  • Loading branch information
anhnhu committed May 29, 2024
1 parent bcec649 commit 035185d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,14 @@ const _TaskItem = ({ actionReloadPoint, className, task }: Props): React.ReactEl

setTaskLoading(true);
let res: SWTransactionResponse | null = null;
const networkKey = 'alephTest';
const networkKey = task.network || '';

if (onChainType) {
const now = new Date();
const date = `${now.getFullYear()}-${now.getMonth() + 1}-${now.getDate()}`;
const data = JSON.stringify({ address, type: onChainType, date });

res = await actionTaskOnChain(onChainType, 'alephTest', address, data);
res = await actionTaskOnChain(onChainType, networkKey, address, data);

if ((res && res.errors.length > 0) || !res) {
setTaskLoading(false);
Expand Down
1 change: 1 addition & 0 deletions packages/extension-koni-ui/src/connector/booka/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ export interface Task {
startTime?: string | null;
endTime?: string | null;
onChainType?: string | null;
network?: string | null;
interval?: number | null;

status: TaskHistoryStatus;
Expand Down

0 comments on commit 035185d

Please sign in to comment.