-
Notifications
You must be signed in to change notification settings - Fork 504
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(borrow): use consistent collateralCryptoAmt
- Loading branch information
Philip London
committed
Feb 10, 2020
1 parent
549a10a
commit 6dcc5a1
Showing
9 changed files
with
75 additions
and
30 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
packages/blockchain-wallet-v4-frontend/src/data/components/borrow/model.ts
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,3 +1,22 @@ | ||
import { CoinType } from 'core/types' | ||
import { Exchange } from 'blockchain-wallet-v4/src' | ||
|
||
export const INVALID_COIN_TYPE = 'Invalid coin type' | ||
|
||
export const NO_OFFER_EXISTS = 'NO_OFFER_EXISTS' | ||
|
||
export const fiatDisplayName = (coin: CoinType) => { | ||
switch (coin) { | ||
case 'PAX': | ||
return 'USD' | ||
default: | ||
return 'USD' | ||
} | ||
} | ||
|
||
export const getAmount = (value: number, coin: CoinType) => { | ||
switch (coin) { | ||
case 'BTC': | ||
return Exchange.convertBtcToBtc({ value, fromUnit: 'BTC', toUnit: 'SAT' }) | ||
} | ||
} |
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
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
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
20 changes: 20 additions & 0 deletions
20
packages/blockchain-wallet-v4-frontend/src/scenes/Borrow/BorrowHistory/template.loading.tsx
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,20 @@ | ||
import { FormattedMessage } from 'react-intl' | ||
import { History, MainTitle } from './template.success' | ||
import React from 'react' | ||
|
||
interface Props {} | ||
|
||
const Loading: React.FC<Props> = () => { | ||
return ( | ||
<History> | ||
<MainTitle size='24px' color='grey800' weight={600}> | ||
<FormattedMessage | ||
id='scenes.borrow.loading.history' | ||
defaultMessage='Loading History...' | ||
/> | ||
</MainTitle> | ||
</History> | ||
) | ||
} | ||
|
||
export default Loading |