2211abbd72
* chore: remove apollo type gen and clean up types lib * fix: format * fix: tests * fix: format * fix: hammer token types til sh*t turns green * fix: format * fix: apparently format again * fix: lint * fix: build-specs * fix: format * chore: regen types * chore: regenerate types again * fix: format
16 lines
412 B
TypeScript
16 lines
412 B
TypeScript
import type { Account } from './accounts-data-provider';
|
|
import * as Schema from '@vegaprotocol/types';
|
|
|
|
interface Props {
|
|
accounts: Account[] | null;
|
|
assetId: string;
|
|
}
|
|
|
|
export const getSettlementAccount = ({ accounts, assetId }: Props) =>
|
|
accounts?.find((account) => {
|
|
return (
|
|
account.asset.id === assetId &&
|
|
account.type === Schema.AccountType.ACCOUNT_TYPE_GENERAL
|
|
);
|
|
}) || null;
|