Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
armaniferrante committed Mar 21, 2021
1 parent 473c276 commit 7b88e16
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 10 deletions.
2 changes: 1 addition & 1 deletion examples/events/Anchor.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
cluster = "localnet"
wallet = "/home/armaniferrante/.config/solana/id.json"
wallet = "~/.config/solana/id.json"
1 change: 0 additions & 1 deletion examples/events/migrations/deploy.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

// Migrations are an early feature. Currently, they're nothing more than this
// single deploy script that's invoked from the CLI, injecting a provider
// configured from the workspace's Anchor.toml.
Expand Down
5 changes: 0 additions & 5 deletions examples/events/package.json

This file was deleted.

4 changes: 1 addition & 3 deletions examples/events/tests/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,12 @@ describe("events", () => {

let listener = null;

let prom = new Promise((resolve, _reject) => {
let [event, slot] = await new Promise((resolve, _reject) => {
listener = program.addEventListener("MyEvent", (event, slot) => {
resolve([event, slot]);
});
program.rpc.initialize();
});

let [event, slot] = await prom;
await program.removeEventListener(listener);

assert.ok(slot > 0);
Expand Down

0 comments on commit 7b88e16

Please sign in to comment.