Skip to content

Commit c6f5366

Browse files
Transfers enable (#221)
* Nam transfers enable. * config unwanted list removed. * shielded fee fixes. * share tweet updates.
1 parent 13ba6fb commit c6f5366

File tree

5 files changed

+27
-5
lines changed

5 files changed

+27
-5
lines changed

src/assets/x.png

351 Bytes
Loading

src/config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
export const config = {
22
// RPC_URL: 'https://namada-mainnet-rpc.mellifera.network',
3-
// REST_URL: 'https://namada-mainnet-indexer.mellifera.network',
3+
REST_URL: 'https://namada-mainnet-indexer.mellifera.network',
44
MASP_REST_URL: 'https://namada-mainnet-masp.mellifera.network',
55
RPC_URL: 'https://namada-rpc.cosmicvalidator.com',
6-
REST_URL: 'https://namada-indexer.cosmicvalidator.com',
6+
// REST_URL: 'https://namada-indexer.cosmicvalidator.com',
77
// MASP_REST_URL: 'https://namada-masp.cosmicvalidator.com',
88
EXPLORER_URL: 'https://namada.valopers.com',
99
STAKING_URL: 'https://namada.omniflix.co/stake',

src/containers/ShieldedAssets/ShieldDialog/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,8 @@ const ShieldDialog = (props) => {
112112
const successObject = {
113113
text: `${tokenName} Shielded Successfully`,
114114
content: 'Your shielded transaction was completed',
115+
tokenName: tokenName,
116+
shielded: true,
115117
}
116118
if (token === config.TOKEN_ADDRESS) {
117119
props.getBalance(props.address, (result) => {

src/containers/Tokens/SuccessDialog/index.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,3 +94,7 @@
9494
line-height: 130%;
9595
text-transform: capitalize;
9696
}
97+
98+
.tokens_success_dialog .dialog_content button img {
99+
margin-left: 8px;
100+
}

src/containers/Tokens/SuccessDialog/index.js

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,21 @@ import { hideTokensTransactionSuccessDialog } from "actions/IBCTransfer";
77
import Lottie from 'lottie-react';
88
import backgroundAnimation from 'assets/abstract_waves_circles.json';
99
import successGif from 'assets/success.gif';
10+
import xlogo from 'assets/x.png';
1011
import Close from "@material-ui/icons/Close";
1112
import './index.css';
1213

1314
const SuccessDialog = (props) => {
15+
const handleClick = () => {
16+
const pageUrl = encodeURIComponent('https://namada.OmniFlix.co');
17+
const newShareText = encodeURIComponent(
18+
`I care about my privacy & just shielded ${props.value?.tokenName} via Namada!\n\nI walk the talk!\n\nDo you? Take action 👇\n`,
19+
);
20+
21+
const targetUrl = `https://twitter.com/intent/tweet?text=${newShareText}&url=${pageUrl}`;
22+
window.open(targetUrl, '_blank');
23+
};
24+
1425
return (
1526
<Dialog open={props.open}
1627
onClose={props.handleClose}
@@ -27,9 +38,14 @@ const SuccessDialog = (props) => {
2738
<div className="dialog_content">
2839
<h2>{props.value?.text || 'OSMO Deposited Successfully'}</h2>
2940
<p>{props.value?.content || 'Your deposit was completed and funds are available'}</p>
30-
<Button onClick={props.handleClose}>
31-
Done
32-
</Button>
41+
{props.value?.shielded
42+
? <Button onClick={handleClick}>
43+
Share on
44+
<img unoptimized alt={'x'} className="x_logo" src={xlogo}/>
45+
</Button>
46+
: <Button onClick={props.handleClose}>
47+
Done
48+
</Button>}
3349
</div>
3450
</Dialog>
3551
)

0 commit comments

Comments
 (0)