Skip to content

Commit

Permalink
Merge branch 'main' of github.com:centrifuge/apps into oracle-v2
Browse files Browse the repository at this point in the history
  • Loading branch information
sophialittlejohn committed Sep 15, 2023
2 parents 98495d5 + 9122ad0 commit 532f334
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export default function LiquidityTransactionsSection({
: []
}, [chartData, dataColors, tooltips, pool.currency.symbol])

return (
return chartData?.length ? (
<PageSection
title={title}
titleAddition={
Expand Down Expand Up @@ -133,5 +133,5 @@ export default function LiquidityTransactionsSection({
<StackedBarChart data={chartData} names={dataNames} colors={dataColors} currency={pool.currency.symbol} />
)}
</PageSection>
)
) : null
}
17 changes: 9 additions & 8 deletions centrifuge-js/src/modules/pools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -738,7 +738,7 @@ export function getPoolsModule(inst: Centrifuge) {
api.query.ormlAssetRegistry.metadata(currency).pipe(
take(1),
switchMap((rawCurrencyMeta) => {
const currencyMeta = rawCurrencyMeta.toHuman() as AssetCurrencyData
const currencyMeta = rawCurrencyMeta.toPrimitive() as AssetCurrencyData
return pinPoolMetadata(metadata, poolId, currencyMeta.decimals, options)
}),
switchMap((pinnedMetadata) => {
Expand Down Expand Up @@ -1753,12 +1753,13 @@ export function getPoolsModule(inst: Centrifuge) {
switchMap((api) =>
api.query.poolSystem.pool(poolId).pipe(
switchMap((rawPool) => {
const pool = rawPool.toHuman() as any
return api.query.ormlAssetRegistry.metadata(pool.currency).pipe(
const pool = rawPool.toPrimitive() as any
const curKey = parseCurrencyKey(pool.currency)
return api.query.ormlAssetRegistry.metadata(curKey).pipe(
map((rawCurrencyMeta) => {
const value = rawCurrencyMeta.toHuman() as AssetCurrencyData
const value = rawCurrencyMeta.toPrimitive() as AssetCurrencyData
const currency: CurrencyMetadata = {
key: pool.currency,
key: curKey,
decimals: value.decimals,
name: value.name,
symbol: value.symbol,
Expand Down Expand Up @@ -2131,8 +2132,8 @@ export function getPoolsModule(inst: Centrifuge) {
switchMap((api) => api.query.ormlAssetRegistry.metadata.entries()),
map((rawMetas) => {
const metas = rawMetas.map(([rawKey, rawValue]) => {
const key = parseCurrencyKey((rawKey.toHuman() as any)[0] as CurrencyKey)
const value = rawValue.toHuman() as AssetCurrencyData
const key = parseCurrencyKey((rawKey.toHuman() as any)[0])
const value = rawValue.toPrimitive() as AssetCurrencyData
const currency: CurrencyMetadata = {
key,
decimals: value.decimals,
Expand Down Expand Up @@ -2369,7 +2370,7 @@ export function getPoolsModule(inst: Centrifuge) {
rawCurrency,
rawPortfolio,
]) => {
const currency = rawCurrency.toHuman() as AssetCurrencyData
const currency = rawCurrency.toPrimitive() as AssetCurrencyData
const rates = rateValues.toPrimitive() as InterestAccrual[]

const oraclePrices: Record<
Expand Down
2 changes: 1 addition & 1 deletion onboarding-api/src/controllers/user/startKyc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export const startKycController = async (req: Request<any, any, InferType<typeof
reference: kycReference,
callback_url: '',
email: userData?.email ?? '',
country: body.countryOfCitizenship,
country: '',
language: 'EN',
redirect_url: '',
verification_mode: 'any',
Expand Down

0 comments on commit 532f334

Please sign in to comment.