ts: add provider parameter to spl token client (#1597)

This commit is contained in:
Armani Ferrante 2022-03-10 22:43:33 -05:00 committed by GitHub
parent 552789a072
commit b149fc522a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -15,6 +15,7 @@ incremented for features.
* lang: Add new `AccountSysvarMismatch` error code and test cases for sysvars ([#1535](https://github.com/project-serum/anchor/pull/1535)).
* spl: Add support for revoke instruction ([#1493](https://github.com/project-serum/anchor/pull/1493)).
* ts: Add provider parameter to `Spl.token` factory method ([#1597](https://github.com/project-serum/anchor/pull/1597)).
### Fixes

View File

@ -1,10 +1,10 @@
import { Program } from "../index.js";
import { Program, Provider } from "../index.js";
import { program as tokenProgram, SplToken } from "./token.js";
export { SplToken } from "./token.js";
export class Spl {
public static token(): Program<SplToken> {
return tokenProgram();
public static token(provider?: Provider): Program<SplToken> {
return tokenProgram(provider);
}
}