flash-sdk 9.0.3 → 9.0.4-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  import { PublicKey } from "@solana/web3.js";
2
2
  import { Privilege } from "../types";
3
- export declare const getReferralAccounts: (tokenStakeAccount: PublicKey, userReferralAccount: PublicKey, rebateTokenAccount: PublicKey, privilege: Privilege) => {
3
+ export declare const getReferralAccounts: (tokenStakeAccount: PublicKey, userReferralAccount: PublicKey, privilege: Privilege) => {
4
4
  pubkey: PublicKey;
5
5
  isSigner: boolean;
6
6
  isWritable: boolean;
@@ -3,11 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getReferralAccounts = void 0;
4
4
  var web3_js_1 = require("@solana/web3.js");
5
5
  var types_1 = require("../types");
6
- var getReferralAccounts = function (tokenStakeAccount, userReferralAccount, rebateTokenAccount, privilege) {
6
+ var getReferralAccounts = function (tokenStakeAccount, userReferralAccount, privilege) {
7
7
  if ((0, types_1.isVariant)(privilege, 'none')) {
8
8
  return [];
9
9
  }
10
- if (tokenStakeAccount.equals(web3_js_1.PublicKey.default) || userReferralAccount.equals(web3_js_1.PublicKey.default) || rebateTokenAccount.equals(web3_js_1.PublicKey.default)) {
10
+ if (tokenStakeAccount.equals(web3_js_1.PublicKey.default) || userReferralAccount.equals(web3_js_1.PublicKey.default)) {
11
11
  console.log("skipping refferals");
12
12
  return [];
13
13
  }
@@ -22,12 +22,7 @@ var getReferralAccounts = function (tokenStakeAccount, userReferralAccount, reba
22
22
  pubkey: tokenStakeAccount,
23
23
  isSigner: false,
24
24
  isWritable: true,
25
- },
26
- {
27
- pubkey: rebateTokenAccount,
28
- isSigner: false,
29
- isWritable: !isStake,
30
- },
25
+ }
31
26
  ];
32
27
  };
33
28
  exports.getReferralAccounts = getReferralAccounts;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flash-sdk",
3
- "version": "9.0.3",
3
+ "version": "9.0.4-alpha.1",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [
@@ -1,23 +0,0 @@
1
- import { BN } from "@coral-xyz/anchor";
2
- import { Trading, VoltageStats } from "./types";
3
- import { PublicKey } from "@solana/web3.js";
4
- export declare class TradingAccount implements Trading {
5
- publicKey: PublicKey;
6
- nftMint: PublicKey;
7
- owner: PublicKey;
8
- delegate: PublicKey;
9
- isInitialized: boolean;
10
- level: number;
11
- bump: number;
12
- voltagePoints: BN;
13
- stats: VoltageStats;
14
- snapshot: VoltageStats;
15
- timestamp: BN;
16
- counter: BN;
17
- tokenStakeAccount: PublicKey;
18
- burnt: boolean;
19
- padding: number[];
20
- constructor(publicKey: PublicKey, parseData: Trading);
21
- static from(publicKey: PublicKey, parseData: Trading): TradingAccount;
22
- updatePoolData(parseData: Trading): void;
23
- }
@@ -1,17 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TradingAccount = void 0;
4
- var TradingAccount = (function () {
5
- function TradingAccount(publicKey, parseData) {
6
- this.publicKey = publicKey;
7
- Object.assign(this, parseData);
8
- }
9
- TradingAccount.from = function (publicKey, parseData) {
10
- return new TradingAccount(publicKey, parseData);
11
- };
12
- TradingAccount.prototype.updatePoolData = function (parseData) {
13
- Object.assign(this, parseData);
14
- };
15
- return TradingAccount;
16
- }());
17
- exports.TradingAccount = TradingAccount;