Skip to content

Commit

Permalink
Add deprecation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
vgrichina committed Feb 25, 2021
1 parent 5302f47 commit 7226bc7
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 18 deletions.
6 changes: 0 additions & 6 deletions lib/account.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 7 additions & 10 deletions lib/account.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion lib/near.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion lib/wallet-account.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions src/account.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use strict';

import BN from 'bn.js';
import depd from 'depd';
import {
transfer,
createAccount,
Expand Down Expand Up @@ -76,11 +77,22 @@ export class Account {
readonly connection: Connection;
readonly accountId: string;

protected get ready(): Promise<void> {
const deprecate = depd('Account.ready()');
deprecate('not needed anymore, always ready');
return Promise.resolve();
}

constructor(connection: Connection, accountId: string) {
this.connection = connection;
this.accountId = accountId;
}

async fetchState(): Promise<void> {
const deprecate = depd('Account.fetchState()');
deprecate('use `Account.state()` instead');
}

/**
* Returns the state of a NEAR account
* @returns {Promise<AccountState>}
Expand Down

0 comments on commit 7226bc7

Please sign in to comment.