yarn lint and yarn format
This commit is contained in:
parent
a2163f7cf4
commit
ab277fee2b
|
@ -77,6 +77,7 @@ const Notification = ({ type, message, description, txid }) => {
|
|||
href={'https://explorer.solana.com/tx/' + txid}
|
||||
className="text-th-primary"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
>
|
||||
View transaction {txid.slice(0, 8)}...
|
||||
{txid.slice(txid.length - 8)}
|
||||
|
|
|
@ -14,6 +14,7 @@ export default function PublicTrades() {
|
|||
|
||||
const fetchTradesForChart = useCallback(async () => {
|
||||
const newTrades = await ChartApi.getRecentTrades(marketAddress)
|
||||
if (!newTrades) return null
|
||||
if (newTrades.length && trades.length === 0) {
|
||||
setTrades(newTrades)
|
||||
} else if (
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
import { ACCOUNT_LAYOUT } from '@blockworks-foundation/mango-client'
|
||||
import { Connection, PublicKey } from '@solana/web3.js'
|
||||
import * as bs58 from 'bs58'
|
||||
import { AccountInfo as TokenAccount } from '@solana/spl-token'
|
||||
import { TokenInstructions } from '@project-serum/serum'
|
||||
import { WRAPPED_SOL_MINT } from '@project-serum/serum/lib/token-instructions'
|
||||
|
||||
|
||||
export const TOKEN_PROGRAM_ID = new PublicKey(
|
||||
'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA'
|
||||
)
|
||||
|
@ -15,9 +13,11 @@ export type ProgramAccount<T> = {
|
|||
account: T
|
||||
}
|
||||
|
||||
export function parseTokenAccountData(
|
||||
data: Buffer
|
||||
): { mint: PublicKey; owner: PublicKey; amount: number } {
|
||||
export function parseTokenAccountData(data: Buffer): {
|
||||
mint: PublicKey
|
||||
owner: PublicKey
|
||||
amount: number
|
||||
} {
|
||||
const { mint, owner, amount } = ACCOUNT_LAYOUT.decode(data)
|
||||
return {
|
||||
mint: new PublicKey(mint),
|
||||
|
|
Loading…
Reference in New Issue