How to use the @0xcert/scaffold.FolderTransferState.ENABLED function in @0xcert/scaffold

To help you get started, we’ve selected a few @0xcert/scaffold examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github 0xcert / framework / packages / 0xcert-web3-folder / src / mutations / set-transfer-state.ts View on Github external
export default async function(folder: Folder, state: FolderTransferState) {
  const from = folder.connector.makerId;
  const paused = state !== FolderTransferState.ENABLED;

  return folder.connector.mutate(() => {
    return folder.contract.methods.setPause(paused).send({ from });
  });
}