Skip to content

Commit

Permalink
status-message-collections refactored
Browse files Browse the repository at this point in the history
  • Loading branch information
volovyks committed Aug 31, 2022
1 parent 579f7ca commit 4c77582
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
2 changes: 0 additions & 2 deletions examples/__tests__/test-status-message-collections.ava.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ test.beforeEach(async t => {
'./build/status-message-collections.wasm',
);

// Init the contract
await statusMessage.call(statusMessage, 'init', {});

// Test users
const ali = await root.createSubAccount('ali');
Expand Down
11 changes: 3 additions & 8 deletions examples/src/status-message-collections.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { NearContract, NearBindgen, call, view, near, LookupSet, UnorderedMap, Vector } from 'near-sdk-js'
import { NearBindgen, call, view, near, LookupSet, UnorderedMap } from 'near-sdk-js'

@NearBindgen
class StatusMessage extends NearContract {
@NearBindgen({})
class StatusMessage {
constructor() {
super()
this.records = new UnorderedMap('a')
this.uniqueValues = new LookupSet('b')
}
Expand Down Expand Up @@ -33,9 +32,5 @@ class StatusMessage extends NearContract {
// used for test UnorderedMap
return this.records.toArray()
}

default() {
return new StatusMessage()
}
}

0 comments on commit 4c77582

Please sign in to comment.