Browse Source

examples/escrow: add idl typehint to Program

Chris Heaney 4 years ago
parent
commit
26b6a0460e
1 changed files with 3 additions and 1 deletions
  1. 3 1
      examples/escrow/tests/escrow.ts

+ 3 - 1
examples/escrow/tests/escrow.ts

@@ -2,11 +2,13 @@ import * as anchor from "@project-serum/anchor";
 import { TOKEN_PROGRAM_ID, Token } from "@solana/spl-token";
 import {assert} from "chai";
 
+import {EscrowIDL} from "./types/escrow";
+
 describe("escrow", () => {
   const provider = anchor.Provider.env();
   anchor.setProvider(provider);
 
-  const program = anchor.workspace.Escrow as anchor.Program;
+  const program = anchor.workspace.Escrow as anchor.Program<EscrowIDL>;
 
   let mintA : Token = null;
   let mintB : Token = null;