This repository was archived by the owner on Jan 6, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 18
New payment card, switching apps, direct URLs, and more #641
Merged
kyranjamie
merged 20 commits into
release/maker-portal-redesign
from
feature/payment-details-card
Oct 31, 2019
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
481fb0d
feat: Better UX of payment details form, update status icon
kyranjamie 21ce788
refactor: Create slice of state for maker portal
kyranjamie 04fea9c
fix: Errors on Submit pageP
kyranjamie c7c43f4
feat: Allow selection of different apps
kyranjamie e75a7ad
refactor: Move selectors to their own file
kyranjamie cdca8d1
fix: Point modal to app element
kyranjamie edcbd66
fix: Merge error and missing dot
kyranjamie 0564524
feat: Change routing to 'maker/apps'
kyranjamie faca69f
feat: Add react-redux types
kyranjamie 5a63a74
refactor: Use app.co scoped action naming convention
kyranjamie 9705b58
adjust actions a bit
aulneau cf96d7b
remove comment
aulneau f039501
add loading selector
aulneau 77b208b
add document check for ssr
aulneau bc1d323
create jwt cookie when sign in, remove on sign out
aulneau 929f5cd
remove console log, prettier
aulneau 84d3468
deps
aulneau 606b061
refactor maker page to use ssr more effectively
aulneau f8be599
cleanup
aulneau 672486d
Merge pull request #652 from blockstack/feature/payment-details-card-…
kyranjamie File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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,51 @@ | ||
import React from 'react' | ||
import { Flex, Box, Type } from 'blockstack-ui' | ||
import { MakerCardHeader, MakerCardText, MakerButton, MakerField } from '../styled' | ||
|
||
export const PaymentContainer = ({ children }) => ( | ||
<Flex> | ||
<Box width={1} mt={0} as="form"> | ||
{children} | ||
</Box> | ||
</Flex> | ||
) | ||
|
||
export const PaymentHeader = MakerCardHeader | ||
|
||
export const PaymentDescription = () => ( | ||
<MakerCardText mb={5} mt={0}> | ||
This is where you will receive your App Mining payments. | ||
Currently, payments are made in Bitcoin (BTC). Payments will be made | ||
in Stacks (STX) in the future. | ||
</MakerCardText> | ||
) | ||
|
||
export const PaymentHelpText = () => ( | ||
<Type.p fontSize={12} mt={0} display="block"> | ||
{"Don't"} have a Stacks address? <a href="https://wallet.blockstack.org" target="_blank" rel="noopener noreferrer">Download the Stacks wallet to get one</a> | ||
</Type.p> | ||
) | ||
|
||
export const PaymentBtcField = props => ( | ||
<MakerField | ||
name="btcAddress" | ||
label="Bitcoin Address" | ||
placeholder="Enter a Bitcoin address" | ||
{...props} | ||
/> | ||
) | ||
|
||
export const PaymentStxField = props => ( | ||
<MakerField | ||
name="stacksAddress" | ||
label="Stacks Address" | ||
placeholder="Enter a Stacks address" | ||
{...props} | ||
/> | ||
) | ||
|
||
export const PaymentButton = ({ children, ...props }) => ( | ||
<MakerButton type="button" mt={4} {...props}> | ||
{children} | ||
</MakerButton> | ||
) |
This file contains hidden or 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,21 @@ | ||
import { address, networks } from 'bitcoinjs-lib' | ||
import * as c32Check from 'c32check' | ||
import memoize from 'lodash/memoize' | ||
|
||
export const validateBTC = memoize(addr => { | ||
try { | ||
address.toOutputScript(addr, networks.bitcoin) | ||
return true | ||
} catch (error) { | ||
return false | ||
} | ||
}) | ||
|
||
export const validateSTX = memoize(addr => { | ||
try { | ||
c32Check.c32addressDecode(addr) | ||
return true | ||
} catch (error) { | ||
return false | ||
} | ||
}) | ||
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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,32 @@ | ||
import React from 'react' | ||
import Link from 'next/link' | ||
import { Type, Box, Button } from 'blockstack-ui' | ||
|
||
const SuccessCard = ({ isAppMiningEligible }) => ( | ||
<Box width="100%" textAlign="center"> | ||
<Box pb={6} width="100%"> | ||
<Type mx="auto" fontSize={5} fontWeight="bold"> | ||
Success! | ||
</Type> | ||
</Box> | ||
<Box mx="auto"> | ||
<Type display="block"> | ||
Thanks for your submission! Your app will need to be approved before being public on app.co. | ||
</Type> | ||
{isAppMiningEligible && ( | ||
<> | ||
<Type my={3} display="block"> | ||
To update your app's details and enroll in App Mining, visit our Maker Portal | ||
</Type> | ||
<Link href={{ pathname: '/maker' }} passHref> | ||
<Button is="a" href="/" color="white !important"> | ||
Go to the Maker Portal | ||
</Button> | ||
</Link> | ||
</> | ||
)} | ||
</Box> | ||
</Box> | ||
) | ||
|
||
export default SuccessCard |
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.