-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix rendering of an ScVec that contains BigInt - stringify was failing
add a number of previously unrendered effects and 1 op
- Loading branch information
Showing
8 changed files
with
178 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import AccountLink from "../shared/AccountLink" | ||
import Asset from "../shared/Asset" | ||
|
||
const CreateClaimableBalanceOperation = ({ amount, sponsor, asset }: any) => { | ||
const [assetCode, assetIssuer] = asset.split(':') | ||
return ( | ||
<span> | ||
<AccountLink account={sponsor} /> created claimable balance for {amount} <Asset code={assetCode} issuer={assetIssuer} type="unknown" /></span> | ||
) | ||
} | ||
|
||
export { CreateClaimableBalanceOperation } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import AccountLink from "../shared/AccountLink" | ||
import Asset from "../shared/Asset" | ||
|
||
|
||
|
||
// export { LiquidityPoolTradeOperation } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,14 @@ | ||
import { FormattedMessage } from 'react-intl' | ||
|
||
const Unrecognized = ({ type }: { type: string }) => <FormattedMessage | ||
id="operation.unrecognized" | ||
values={{ | ||
type: type, | ||
}} | ||
/> | ||
const Unrecognized = (props: any) => { | ||
const { type }: { type: string } = props | ||
console.log(JSON.stringify(props, null, 2)) | ||
return (<FormattedMessage | ||
id="operation.unrecognized" | ||
values={{ | ||
type: type, | ||
}} | ||
/>) | ||
} | ||
|
||
export default Unrecognized |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
import type { ServerApi } from "stellar-sdk" | ||
|
||
import Card from 'react-bootstrap/Card' | ||
import CardHeader from 'react-bootstrap/CardHeader' | ||
import Container from 'react-bootstrap/Container' | ||
import Row from 'react-bootstrap/Row' | ||
import { FormattedMessage, useIntl } from 'react-intl' | ||
import { requestToServer } from '~/lib/stellar/server' | ||
|
||
import { LoaderArgs, json } from '@remix-run/node' | ||
import { useLoaderData } from '@remix-run/react' | ||
|
||
import EffectTable from '../components/EffectTable' | ||
import { setTitle } from '../lib/utils' | ||
|
||
import { effects } from '~/lib/stellar/server_request_utils' | ||
import { EffectProps } from "~/components/Effect" | ||
import { useEffect } from "react" | ||
|
||
export const loader = ({ request, params }: LoaderArgs) => { | ||
const server = requestToServer(request) | ||
return effects(server, { operationId: params.opId }).then(effects => | ||
effects.map( | ||
(effect: ServerApi.EffectRecord) => ({ | ||
...effect, | ||
op: effect.operation ? effect.operation() : undefined | ||
}) as EffectProps | ||
) | ||
).then(json) | ||
} | ||
|
||
export default function Effects() { | ||
const records = useLoaderData<typeof loader>() | ||
|
||
const { formatMessage } = useIntl() | ||
useEffect(() => { | ||
setTitle(formatMessage({ id: 'effects' })) | ||
}, []) | ||
|
||
return ( | ||
<Container> | ||
<Row> | ||
<Card> | ||
<CardHeader> | ||
<FormattedMessage id="effects" /> | ||
</CardHeader> | ||
<Card.Body> | ||
<EffectTable | ||
records={records as ReadonlyArray<EffectProps>} | ||
// showEffect | ||
// showSource | ||
// compact={false} | ||
// limit={20} | ||
/> | ||
</Card.Body> | ||
</Card> | ||
</Row> | ||
</Container> | ||
) | ||
} |