From e05c5a656317cfd8bf71d79f57d18aef3a26993a Mon Sep 17 00:00:00 2001 From: CAPtheorem <79423264+CAPtheorem@users.noreply.github.com> Date: Thu, 12 May 2022 16:25:54 -0700 Subject: [PATCH 1/2] twitter button --- .../src/containers/wallet/token/Token.js | 58 +++++++++++++----- packages/boba/gateway/src/images/twitter.png | Bin 0 -> 1514 bytes yarn.lock | 8 +-- 3 files changed, 48 insertions(+), 18 deletions(-) create mode 100644 packages/boba/gateway/src/images/twitter.png diff --git a/packages/boba/gateway/src/containers/wallet/token/Token.js b/packages/boba/gateway/src/containers/wallet/token/Token.js index c98fd24c3f..eedecd6077 100644 --- a/packages/boba/gateway/src/containers/wallet/token/Token.js +++ b/packages/boba/gateway/src/containers/wallet/token/Token.js @@ -15,6 +15,8 @@ import { openAlert, openError } from 'actions/uiAction' import * as S from './Token.styles' import * as G from '../../Global.styles' +import twitter from 'images/twitter.png' + import { Box, Typography, CircularProgress, Input } from '@mui/material' import { tokenTableHeads } from './token.tableHeads' @@ -58,15 +60,18 @@ function TokenPage() { const unorderedTransactions = useSelector(selectTransactions, isEqual) const orderedTransactions = orderBy(unorderedTransactions, i => i.timeStamp, 'desc') -//BOBAB5DAD3D10 - let bobaTag = '' if(walletAddress) bobaTag = Md5.hashStr(walletAddress.toLowerCase().substring(2)) let BT = '' - if (bobaTag) + let tweet = '' + if (bobaTag) { BT = "BOBA" + bobaTag.substring(0, 9).toUpperCase() + tweet = "https://twitter.com/intent/tweet?text=I%27m%20developing%20on%20Boba%20Network%20" + BT + } + + console.log("tweet:",tweet) const pendingL1 = orderedTransactions.filter((i) => { if (i.chain === 'L1pending' && //use the custom API watcher for fast data on pending L1->L2 TXs @@ -223,7 +228,8 @@ function TokenPage() { {layer === 'L2' && network === 'rinkeby' && - + + Developer Twitter/Turing test token fountain - your Boba Bubble:{" "} {BT} @@ -231,17 +237,41 @@ function TokenPage() { - Welcome to Boba! This is a special fountain for developers with empty wallets. - To receive testnet BOBA and ETH, tweet your Boba Bubble and - paste the tweet link in the field below. - You can get the link on Twitter by tapping the share icon, then tapping - "Share Tweet via", and finally selecting "Copy link to Tweet". - Your link should look something like this: https://twitter.com/name/status/1234567 + Welcome developers. + For testnet BOBA and ETH, tweet your Boba Bubble and + then paste the tweet link in the field below. + + + Tweet Now + + + + For the Tweet link, tap the share icon, tap "Share Tweet via", and finally select "Copy link to Tweet". setTweetUrl(e?.target?.value.split('?')[0])} //remove the superfluous stuff after the "?" /> @@ -249,13 +279,13 @@ function TokenPage() { You are limited to one fountain call per twitter account per day. The transaction will not show in your history since it's a MetaTransaction (the gas is covered by Boba). If you already have some ETH in your wallet to cover gas you can use our - alternative faucet - . + . - {this.state.faucetErrorMsg ? {this.state.faucetErrorMsg} : null} - diff --git a/packages/boba/gateway/src/containers/wallet/token/Token.js b/packages/boba/gateway/src/containers/wallet/token/Token.js index eedecd6077..f214f45622 100644 --- a/packages/boba/gateway/src/containers/wallet/token/Token.js +++ b/packages/boba/gateway/src/containers/wallet/token/Token.js @@ -71,8 +71,6 @@ function TokenPage() { tweet = "https://twitter.com/intent/tweet?text=I%27m%20developing%20on%20Boba%20Network%20" + BT } - console.log("tweet:",tweet) - const pendingL1 = orderedTransactions.filter((i) => { if (i.chain === 'L1pending' && //use the custom API watcher for fast data on pending L1->L2 TXs i.crossDomainMessage &&