import { constructContinueTx, Context } from '@coinweb/contract-kit';
import { getMethodArguments } from 'lib/onchain';

import { constructMutexBlockLockClaimStore } from '../claims/mutexBlockLock';
import { MutexNotifyLockArgs } from '../types';

export const notifyLock = (context: Context) => {
  const [lockInfo] = getMethodArguments<MutexNotifyLockArgs>(context);

  return [constructContinueTx(context, [constructMutexBlockLockClaimStore(lockInfo)])];
};
