How to use the @0xcert/scaffold.AssetLedgerTransferState.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-asset-ledger / src / mutations / set-transfer-state.ts View on Github external
export default async function(ledger: AssetLedger, state: AssetLedgerTransferState) {
  const paused = state !== AssetLedgerTransferState.ENABLED;

  return ledger.context.mutate(async () => {
    return ledger.contract.methods.setPause(paused);
  });
}