Skip to content
Merged

v2.4 #680

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
fe42d50
add account page with list of tokens wallet owns
Oct 9, 2019
27aede7
add create new token link
Oct 10, 2019
e9ba566
add ticker card
Oct 16, 2019
bb87b74
GT-93 r/DEMO/SAMPLE EMAIL
ross-rosario Nov 27, 2019
21b9c2c
GT-143 r/creat/config
ross-rosario Nov 27, 2019
b72872b
GT-143 cont
ross-rosario Nov 27, 2019
3c39e67
Merge branch 'develop' of github.com:PolymathNetwork/polymath-apps in…
ross-rosario Nov 29, 2019
a00dad6
Merge pull request #672 from PolymathNetwork/chore/copy-changes
ross-rosario Nov 29, 2019
1217027
Merge branch 'develop' into feat/account-page
Dec 2, 2019
2f57622
remove comments
Dec 2, 2019
55eeac9
add logic for when a user has no tokens
Dec 2, 2019
66c377f
fix copy for buttons
Dec 3, 2019
e8aeb46
enable emails listener in prod only
Dec 4, 2019
98090fa
Merge pull request #674 from PolymathNetwork/fix/dupe-emails
FahdW Dec 4, 2019
48578c0
Merge pull request #673 from PolymathNetwork/feat/account-page
FahdW Dec 5, 2019
7ddc947
remove deprecated functions
Dec 9, 2019
c20ba5c
Merge pull request #675 from PolymathNetwork/feat/metamask-changes
ross-rosario Dec 9, 2019
f04f0c0
remove button from dashboard
Dec 11, 2019
5ea284d
Merge pull request #676 from PolymathNetwork/feat/dashboard
FahdW Dec 11, 2019
45a4b8e
GT-143: rename 'continue' button
ross-rosario Dec 12, 2019
5d46bb2
Remove testing file
ross-rosario Dec 12, 2019
2e60e41
Merge pull request #677 from PolymathNetwork/chore/GT-143
FahdW Dec 12, 2019
b8ec666
GT-144: rename 'advisory' section
ross-rosario Dec 12, 2019
a3329f5
Merge pull request #678 from PolymathNetwork/GT-144-advisory
FahdW Dec 12, 2019
d51189d
add logos capital
Dec 16, 2019
c4a35b5
Merge pull request #679 from PolymathNetwork/feat/add-logos-capital
FahdW Dec 16, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions config/contractDocs.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ const config = {
SecurityToken: {
description: stripIndent`
The security token smart contract. It defines the behavior of the
Security Tokens created through Polymath.
Security Tokens configured through Polymath.

Only the token's owner and the attached STO module (if there is one) can
mint tokens.
Expand All @@ -180,9 +180,9 @@ const config = {
Keeps track of all the Security Tokens that exist in the network.
Keeps record of the tickers reserved by users.

Through this contract Security Tokens can be created and Tickers can be registered.
Through this contract Security Tokens can be configured and Tickers can be registered.
It requires an allowance (of at least the registration fee) to be set to be able
to create a Security Token
to configure a Security Token
`,
methods: SecurityTokenRegistryMethods,
},
Expand Down
11 changes: 4 additions & 7 deletions packages/new-polymath-sdk/src/browserUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ interface Ethereum extends HttpProvider {
networkVersion: string;
_metamask?: {
isApproved: () => Promise<boolean>;
isUnlocked: () => Promise<boolean>;
};
enable(): Promise<any>;
}
Expand Down Expand Up @@ -117,14 +118,10 @@ export async function getCurrentAddress() {
const support = getBrowserSupport();

if (isModern(win)) {
// Special check for Metamask to know if it is locked or not
if (win.ethereum._metamask) {
const isApproved = await win.ethereum._metamask.isApproved();
if (isApproved) {
accounts = await web3.eth.getAccounts();
if (!accounts.length) {
throw new PolymathError({ code: ErrorCodes.WalletIsLocked });
}
const isUnlocked = await win.ethereum._metamask.isUnlocked();
if (!isUnlocked) {
throw new PolymathError({ code: ErrorCodes.WalletIsLocked });
}
}
await enableWallet();
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions packages/polymath-issuer/src/actions/account.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { SecurityTokenRegistry } from '@polymathnetwork/js';

export const TICKER_LIST = 'account/TICKER_LIST';
export const getTickerList = tickers => ({
type: TICKER_LIST,
tickers,
});

export const fetchTickerList = () => async (
dispatch: Function,
getState: GetState
) => {
const str = await SecurityTokenRegistry.create();
const walletAddress = getState().session.wallet.address;
const newTokens = await str.getTickersByOwner(walletAddress);
dispatch(getTickerList(newTokens));
};
2 changes: 1 addition & 1 deletion packages/polymath-issuer/src/actions/sto.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ export const fetch = () => async (dispatch: Function, getState: GetState) => {
try {
const { token } = getState().token;

// No token created yet
// No token configured yet
if (!token || !token.contract) {
dispatch(ui.fetched());
return;
Expand Down
24 changes: 12 additions & 12 deletions packages/polymath-issuer/src/actions/token.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,15 +209,15 @@ export const issue = (values: Object) => async (
ui.confirm(
<div>
<p>
Completion of your token creation will require{' '}
Completion of your token configuration will require{' '}
{limitInvestors ? 'three' : !isApproved ? 'two' : 'one'} wallet
transaction(s).
</p>
{!isApproved ? (
<div>
<p>
• The first transaction will be used to prepare for the payment of
the token creation cost of:
the token configuration cost of:
</p>
<div className="bx--details poly-cost">{feeView} POLY</div>
</div>
Expand All @@ -226,8 +226,8 @@ export const issue = (values: Object) => async (
)}
<p>
• {!isApproved ? 'The second' : 'This'} transaction will be used to
pay for the token creation cost (POLY + mining fee) to complete the
creation of your token.
pay for the token configuration cost (POLY + mining fee) to complete
the configuration of your token.
</p>
{limitInvestors && (
<p>
Expand All @@ -239,19 +239,19 @@ export const issue = (values: Object) => async (
)}
<p>
Please hit &laquo;CONFIRM&raquo; when you are ready to proceed. Once
you hit &laquo;CONFIRM&raquo;, your security token will be created on
the blockchain.
you hit &laquo;CONFIRM&raquo;, your security token will be configured
on the blockchain.
<br />
If you do not wish to pay the token creation fee or wish to review
your information, simply select &laquo;CANCEL&raquo;.
If you do not wish to pay the token configuration fee or wish to
review your information, simply select &laquo;CANCEL&raquo;.
</p>
</div>,
async () => {
// $FlowFixMe
if (getState().pui.account.balance.lt(fee)) {
dispatch(
ui.faucet(
`The creation of a security token has a fixed cost of ${feeView} POLY.`
`The configuration of a security token has a fixed cost of ${feeView} POLY.`
)
);
return;
Expand All @@ -263,7 +263,7 @@ export const issue = (values: Object) => async (
// );

//Skip approve transaction if transfer is already allowed
let title = ['Creating Security Token'];
let title = ['Configuring Security Token'];

if (!isApproved) {
title.unshift('Approving POLY Spend');
Expand Down Expand Up @@ -303,11 +303,11 @@ export const issue = (values: Object) => async (
`/dashboard/${ticker}`,
undefined,
false,
ticker.toUpperCase() + ' Token Creation'
ticker.toUpperCase() + ' Token Configuration'
)
);
},
`Before you Proceed with Your ${ticker.toUpperCase()} Token Creation`,
`Before you Proceed with Your ${ticker.toUpperCase()} Token Configuration`,
undefined,
'pui-large-confirm-modal'
)
Expand Down
4 changes: 2 additions & 2 deletions packages/polymath-issuer/src/components/MigrateTokenPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,8 @@ class MigrateTokenPage extends Component<{| handleClick: Function |}> {
<p>
The cost of this migration is the gas fee required to complete
the simple 2-step process to migrate your tokens from v1.3.0 to
v2.0.0. The cost of creating the security token will be borne by
Polymath.
v2.0.0. The cost of configuring the security token will be borne
by Polymath.
</p>
</AccordionItem>
<AccordionItem title="What benefits would I get by moving to v2.0.0?">
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import React, { Component } from 'react';
import { PageCentered, Button, Toaster, notify } from '@polymathnetwork/ui';
import { Link } from 'react-router-dom';

export default class TickerCard extends Component {
render() {
const { ticker } = this.props;
return (
<div className="token-symbol-wrapper">
<div className="pui-page-box">
<h3>Configure New Security Token</h3>
<div style={{ height: '140px' }} />
<br />
<Link to="/ticker">
<Button kind="secondary" className="export-tokens-list-btn">
Get Started
</Button>
</Link>
</div>
</div>
);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import React, { Component } from 'react';
import { PageCentered, Button, Toaster, notify } from '@polymathnetwork/ui';
import { Link } from 'react-router-dom';

export default class TickerCard extends Component {
render() {
const { ticker } = this.props;
return (
<div className="token-symbol-wrapper">
<div className="pui-page-box">
<div className="ticker-field">
<div className="bx--form-item">
<label htmlFor="ticker" className="bx--label">
Token Symbol
</label>
<input
type="text"
name="ticker"
value={ticker}
id="ticker"
readOnly
className="bx--text-input bx--text__input"
/>
</div>
</div>
<br />
<Link to={`/dashboard/${ticker}`}>
<Button kind="secondary" className="export-tokens-list-btn">
Open Dashboard
</Button>
</Link>
</div>
</div>
);
}
}
62 changes: 62 additions & 0 deletions packages/polymath-issuer/src/pages/account/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
import React, { Component } from 'react';
import { Link } from 'react-router-dom';
import {
PageCentered,
Button,
Toaster,
notify,
Grid,
} from '@polymathnetwork/ui';
import { connect } from 'react-redux';
import { fetchTickerList } from '../../actions/account';
import TickerCard from './components/TickerCard';
import ConfigCard from './components/ConfigCard';

class HomePage extends Component {
async componentDidMount() {
await this.props.fetchTickerList();
if (this.props.tickers.length === 0) {
this.props.history.push('/ticker');
}
}

render() {
const { tickers } = this.props;
return (
<PageCentered>
<Grid>
<Grid.Row>
<Grid.Col gridSpan={12}>
<h1>Manage your security tokens</h1>
</Grid.Col>
</Grid.Row>
<Grid.Row>
<Grid.Col gridSpan={4}>
<ConfigCard />
</Grid.Col>
{tickers.map(ticker => {
return (
<Grid.Col gridSpan={4}>
<TickerCard ticker={ticker} />
</Grid.Col>
);
})}
</Grid.Row>
</Grid>
</PageCentered>
);
}
}

const mapStateToProps = state => ({
tickers: state.account.tickers,
});

const mapDispatchToProps = {
fetchTickerList,
};

export default connect(
mapStateToProps,
mapDispatchToProps
)(HomePage);
4 changes: 2 additions & 2 deletions packages/polymath-issuer/src/pages/home/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ class HomePage extends Component {
<br />
<br />
<p>
<Link to="/ticker">
<Link to="/account">
<Button id="create-token-btn" icon="arrow--right">
Create your security token
Configure your security token
</Button>
</Link>
</p>
Expand Down
8 changes: 4 additions & 4 deletions packages/polymath-issuer/src/pages/providers/ProvidersPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,14 +183,14 @@ class ProvidersPage extends Component<Props, State> {
<p>
Please make sure you have received sufficient information from one of
the Advisors or the Legal firms listed below or your own advisor before
you proceed with the token creation.
you proceed with the token configuration.
</p>,
() => {
// $FlowFixMe
this.props.history.push('/dashboard/' + this.props.token.ticker);
},
'Before You Proceed',
'Create Token'
'Configure Token'
);
};

Expand Down Expand Up @@ -271,9 +271,9 @@ class ProvidersPage extends Component<Props, State> {
<div className="pui-countdown-container">
{!token.address && token.expires ? (
<Countdown
title="Time Left to Create Your Token"
title="Time Left to Configure Your Token"
deadline={token.expires}
buttonTitle="Create Your Token Now"
buttonTitle="Configure Your Token Now"
handleButtonClick={this.handleCreateToken}
/>
) : (
Expand Down
14 changes: 13 additions & 1 deletion packages/polymath-issuer/src/pages/providers/data.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const statuses = ['Selected as Provider', 'Provider Declined', 'Other'];
export const categories: Array<SPCategory> = [
{
id: 0,
title: 'Advisory',
title: 'Advisory / Broker-Dealers',
desc:
'Advisory firms may help you plan and execute your STO. Your Polymath dashboard is integrated with the ' +
'following Advisory firms. Alternatively, you can elect to use your own Advisory services.',
Expand Down Expand Up @@ -250,6 +250,18 @@ const providers: Array<ServiceProvider> = [
Global Payments Processing, KYC/AML Forensics, KYC/AML Engine, Custody Services, OTC Services, Insurance Services, Legal Services, \
Tax Services, Liquidity Trading Technology Services, Prime Brokerage Services',
},
{
id: 55,
cat: 0,
title: 'Logos Capital',
logo: '/providers/advisory/logos.png',
background: '/providers/advisory/bg/img-logos.png',
desc:
'Logos Capital catalyzes and accelerates impactful enterprises via global business development, \
mergers & acquisitions, investment and a joint venture in public and private sectors. Primarily focused on impact \
investing in the U.S., Latin America, Africa, and the Caribbean, Logos Capital is based in Miami, FL and comprised of \
personnel from around the world.',
},

// LEGAL
{
Expand Down
2 changes: 1 addition & 1 deletion packages/polymath-issuer/src/pages/ticker/TickerPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class TickerPage extends Component<Props, State> {
</Heading>
<Heading as="h3" variant="h4" mr={190}>
Your token symbol will be reserved for {this.props.expiryLimit}{' '}
days, and is permanently yours once you create your Token. This
days, and is permanently yours once you configure your Token. This
reservation ensures that no other organization can create a token
symbol identical to yours using the Polymath platform. This
operation carries a cost of: {this.state.tickerRegistrationFee}{' '}
Expand Down
6 changes: 3 additions & 3 deletions packages/polymath-issuer/src/pages/token/TokenPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,14 +165,14 @@ class TokenPage extends Component<Props, State> {
<div className="token-countdown-container">
<Countdown small title="Time Left" deadline={token.expires} />
</div>
<h2 className="pui-h2">Create Your Security Token</h2>
<h2 className="pui-h2">Configure Your Security Token</h2>
<Heading variant="h4">
Create your security token before your token reservation
Configure your security token before your token reservation
expires. If you let your token reservation expire, the token
symbol you selected will be available for others to claim.
</Heading>
<Heading variant="h4">
To proceed with the creation of your security token, we
To proceed with the configuration of your security token, we
recommend you work with your Advisory to answer the following
questions:
</Heading>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ export const CompleteTokenFormComponent = ({ handleSubmit, values }) => (
) : null}
</Grid.Col>
</Grid.Row>
<Button type="submit">Create my security token</Button>
<Button type="submit">Configure my security token</Button>
</Form>
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class Progress extends Component<Props> {
<ProgressIndicator currentIndex={index}>
<ProgressIndicator.Step label="Reserve Token Symbol" />
<ProgressIndicator.Step label="Choose Your Providers" />
<ProgressIndicator.Step label="Create Token" />
<ProgressIndicator.Step label="Configure Token" />
<ProgressIndicator.Step label="Set Up Offering Details" />
<ProgressIndicator.Step label="Whitelist Investors" />
</ProgressIndicator>
Expand Down
Loading