Skip to content

Commit

Permalink
WebWorker for RSAGEN() (#30)
Browse files Browse the repository at this point in the history
* RainbowKit placement fix

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* RainbowKit styling

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* Fix for Wagmi2.0 and RainbowKit1.0 migration

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* Fix for Wagmi2.0 and RainbowKit1.0 migration: 2

* auto-commit: gh-pages

* auto-commit: gh-pages

* Fix for Wagmi2.0 and RainbowKit1.0 migration: 3

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* rSync

* auto-commit: gh-pages

* Mainnet Ready

* auto-commit: gh-pages

* Refresh buttons

* auto-commit: gh-pages

* auto-commit: gh-pages

* Search function

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* Testing Goerli-v7

* HTTP Gateway Integration

* auto-commit: gh-pages

* HTTP Gateway Integration: 2

* auto-commit: gh-pages

* auto-commit: gh-pages

* Finetune

* Confirmation tab for Ownerhash

* auto-commit: gh-pages

* Caching while setting Ownerhash

* auto-commit: gh-pages

* Some triggers fixed

* auto-commit: gh-pages

* Signer Signature

* auto-commit: gh-pages

* Export Signatures

* Fix for queue

* Finetune: 2

* auto-commit: gh-pages

* auto-commit: gh-pages

* Finetune: 3

* auto-commit: gh-pages

* Update Signature text for SIG1

* auto-commit: gh-pages

* Password Dialogue improvements

* auto-commit: gh-pages

* Bad Password Break

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* Several bug fixes

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* Preview Panel Load Fix

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* rSync

* fast

* Merge rSync

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* Mainnet Release: v1.0.0

* PWA and other improvements

* Support for NFT avatars (#17)

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* NFT Avatar Support

* Emoji Support (#18)

* Support for NFT avatars

* Emoji Support

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* Client Help Page

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* Cleanup keygen.ts

* auto-commit: gh-pages

* Minor Fixes in Search Tab

* auto-commit: gh-pages

* Minor Fixes in Search Tab: 2

* auto-commit: gh-pages

* rSync

* Labels on Export Fields & GoDID Link

* auto-commit: gh-pages

* IPFS Hash Export

* auto-commit: gh-pages

* IPFS Hash Export: 2

* IPFS Hash Export: 3

* auto-commit: gh-pages

* Fix for names with Config

* auto-commit: gh-pages

* Fix Manager vs Owner issue

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* Contenthash Regex Fix

* Minor Fixes

* auto-commit: gh-pages

* rSync

* Minor Makeup

* Security Fixes

* auto-commit: gh-pages

* Stealth Payment (#24)

* WIP

* Stealth Payments

* auto-commit: gh-pages

* auto-commit: gh-pages

* Stealth Payments: 2

* Stealth Payments: 3

* auto-commit: gh-pages

* Stealth Payments: Finetune

* Stealth Payments: Finetune 2

* WIP: Gateway

* WIP: Gateway as Ownerhash

* auto-commit: gh-pages

* WIP: RSA

* Stealth Payments & Gateways

* Stealth Payments & Gateways: 2

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* Socials and Addresses

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* Socials and Addresses: 2

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* Several Fixes

* non-BTC coinTypes

* non-BTC coinTypes: 2

* auto-commit: gh-pages

* auto-commit: gh-pages

* Block non-BTC coinTypes

* auto-commit: gh-pages

* auto-commit: gh-pages

* Minor Fixes

* v1.1-beta

* auto-commit: gh-pages

* rSync 'dev' (#29)

* v1.1-beta (#27)

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* RainbowKit placement fix

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* RainbowKit styling

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* Fix for Wagmi2.0 and RainbowKit1.0 migration

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* Fix for Wagmi2.0 and RainbowKit1.0 migration: 2

* auto-commit: gh-pages

* auto-commit: gh-pages

* Fix for Wagmi2.0 and RainbowKit1.0 migration: 3

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* rSync

* auto-commit: gh-pages

* Mainnet Ready

* auto-commit: gh-pages

* Refresh buttons

* auto-commit: gh-pages

* auto-commit: gh-pages

* Search function

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* Testing Goerli-v7

* HTTP Gateway Integration

* auto-commit: gh-pages

* HTTP Gateway Integration: 2

* auto-commit: gh-pages

* auto-commit: gh-pages

* Finetune

* Confirmation tab for Ownerhash

* auto-commit: gh-pages

* Caching while setting Ownerhash

* auto-commit: gh-pages

* Some triggers fixed

* auto-commit: gh-pages

* Signer Signature

* auto-commit: gh-pages

* Export Signatures

* Fix for queue

* Finetune: 2

* auto-commit: gh-pages

* auto-commit: gh-pages

* Finetune: 3

* auto-commit: gh-pages

* Update Signature text for SIG1

* auto-commit: gh-pages

* Password Dialogue improvements

* auto-commit: gh-pages

* Bad Password Break

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* Several bug fixes

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* Preview Panel Load Fix

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* rSync

* fast

* Merge rSync

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* Mainnet Release: v1.0.0

* PWA and other improvements

* Support for NFT avatars (#17)

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* NFT Avatar Support

* Emoji Support (#18)

* Support for NFT avatars

* Emoji Support

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* Client Help Page

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* Cleanup keygen.ts

* auto-commit: gh-pages

* Minor Fixes in Search Tab

* auto-commit: gh-pages

* Minor Fixes in Search Tab: 2

* auto-commit: gh-pages

* rSync

* Labels on Export Fields & GoDID Link

* auto-commit: gh-pages

* IPFS Hash Export

* auto-commit: gh-pages

* IPFS Hash Export: 2

* IPFS Hash Export: 3

* auto-commit: gh-pages

* Fix for names with Config

* auto-commit: gh-pages

* Fix Manager vs Owner issue

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* Contenthash Regex Fix

* Minor Fixes

* auto-commit: gh-pages

* rSync

* Minor Makeup

* Security Fixes

* auto-commit: gh-pages

* Stealth Payment (#24)

* WIP

* Stealth Payments

* auto-commit: gh-pages

* auto-commit: gh-pages

* Stealth Payments: 2

* Stealth Payments: 3

* auto-commit: gh-pages

* Stealth Payments: Finetune

* Stealth Payments: Finetune 2

* WIP: Gateway

* WIP: Gateway as Ownerhash

* auto-commit: gh-pages

* WIP: RSA

* Stealth Payments & Gateways

* Stealth Payments & Gateways: 2

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* Socials and Addresses

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* Socials and Addresses: 2

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* Several Fixes

* non-BTC coinTypes

* non-BTC coinTypes: 2

* auto-commit: gh-pages

* auto-commit: gh-pages

* Block non-BTC coinTypes

* auto-commit: gh-pages

* auto-commit: gh-pages

* Minor Fixes

* v1.1-beta

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* v1.1-beta: 2

* auto-commit: gh-pages

* auto-commit: gh-pages

* Final v1.1-beta release

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* auto-commit: gh-pages

* WebWorker for RSAGEN()

* rSync
  • Loading branch information
sshmatrix authored Sep 14, 2023
1 parent 3a8d9cd commit 281ba5e
Show file tree
Hide file tree
Showing 38 changed files with 180 additions and 90 deletions.
1 change: 0 additions & 1 deletion components/Error.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ const StyledModalHeader = styled.div`

const StyledModal = styled.div`
position: fixed;
top: 300px;
background: red;
width: 400px;
height: auto;
Expand Down
1 change: 0 additions & 1 deletion components/Gas.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,6 @@ const StyledModalHeader = styled.div`

const StyledModal = styled.div`
position: fixed;
top: 250px;
background: rgba(66,46,40,1);
background-size: 400% 400%;
width: auto;
Expand Down
4 changes: 2 additions & 2 deletions components/Preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3447,7 +3447,7 @@ const StyledModalHeader = styled.div`

const StyledModal = styled.div`
position: fixed;
top: 60px;
top: 60px;
width: auto;
min-width: 400px;
border-radius: 6px;
Expand All @@ -3460,7 +3460,7 @@ const StyledModal = styled.div`

const StyledModalOverlay = styled.div`
position: absolute;
top: -60px;
top: 0;
left: 0;
width: 100%;
height: 100%;
Expand Down
1 change: 0 additions & 1 deletion components/Salt.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,6 @@ const StyledModalHeader = styled.div`

const StyledModal = styled.div`
position: fixed;
top: 200px;
background: rgba(66,46,40,1);
background-size: 400% 400%;
width: 460px;
Expand Down
120 changes: 92 additions & 28 deletions components/Stealth.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ const Stealth: React.FC<ModalProps> = ({ show, onClose, _ENS_, chain, handlePare
const [gas, setGas] = React.useState<{}>({}); // Sets historical gas savings
const [wrapped, setWrapped] = React.useState(false); // Indicates if the ENS Domain is wrapped
const [keypairIPNS, setKeypairIPNS] = React.useState<[string, string]>(); // Sets generated K_IPNS keys
const [keypairRSA, setKeypairRSA] = React.useState<[string, string]>(); // Sets generated K_RSA keys
const [keypairRSA, setKeypairRSA] = React.useState<[any, string]>(); // Sets generated K_RSA keys
const [keypairSigner, setKeypairSigner] = React.useState<[string, string]>(); // Sets generated K_IPNS and K_SIGNER keys
const [updateRecords, setUpdateRecords] = React.useState(false); // Triggers signature for record update
const [write, setWrite] = React.useState(false); // Triggers update of record to the NameSys backend and IPNS
Expand Down Expand Up @@ -149,6 +149,8 @@ const Stealth: React.FC<ModalProps> = ({ show, onClose, _ENS_, chain, handlePare
const origin = `eth:${_Wallet_ || constants.zeroAddress}`
const PORT = process.env.NEXT_PUBLIC_PORT
const SERVER = process.env.NEXT_PUBLIC_SERVER

// Wagmi Signature hook
const {
data: signature,
error: signError,
Expand All @@ -159,7 +161,7 @@ const Stealth: React.FC<ModalProps> = ({ show, onClose, _ENS_, chain, handlePare
const address = verifyMessage(variables.message, data)
recoveredAddress.current = address
},
}) // Wagmi Signature hook
})

// Write hooks
const { config: sendPayment } = usePrepareSendTransaction({
Expand Down Expand Up @@ -398,7 +400,7 @@ const Stealth: React.FC<ModalProps> = ({ show, onClose, _ENS_, chain, handlePare
// Signature S_RSA statement; S_RSA(K_WALLET) [Signer Keygen]
// S_RSA generates AES-encrypted text
function statementEncryptionKey(extradata: string) {
let _toSign = `Requesting Signature To Generate Encryption Key\n\nOrigin: ${ENS}\nKey Type: RSA-1048\nExtradata: ${extradata}\nSigned By: ${caip10}`
let _toSign = `Requesting Signature To Generate Encryption Key\n\nOrigin: ${ENS}\nKey Type: RSA-2048\nExtradata: ${extradata}\nSigned By: ${caip10}`
let _digest = _toSign
return _digest
}
Expand Down Expand Up @@ -723,7 +725,7 @@ const Stealth: React.FC<ModalProps> = ({ show, onClose, _ENS_, chain, handlePare
const _revision = JSON.parse(JSON.stringify(revision, (key, value) => {
return typeof value === 'bigint' ? String(value) : value
}))
if(_revision._name._privKey) _revision._name._privKey._key = {}
if (_revision._name._privKey) _revision._name._privKey._key = {}
__revision = JSON.stringify(_revision)
} else {
__revision = JSON.stringify(__revision)
Expand Down Expand Up @@ -1150,14 +1152,47 @@ const Stealth: React.FC<ModalProps> = ({ show, onClose, _ENS_, chain, handlePare
React.useEffect(() => {
if (isPayment && keygen) {
if (sigRSA && saltModalState.trigger) {
setMessage(['Generating Encryption Key', ''])
const keygen = async () => {
const _origin = hashType !== 'recordhash' ? `eth:${_Wallet_ || constants.zeroAddress}` : ENS
const __keypair = await RSAGEN(_origin, caip10, sigRSA, saltModalState.modalData)
setKeypairRSA(__keypair)
setMessage(['Generating Encryption Key', '+'])
const origin = hashType !== 'recordhash' ? `eth:${_Wallet_ || constants.zeroAddress}` : ENS
const worker = new Worker(new URL('../src/worker/worker', import.meta.url))
worker.onmessage = (event) => {
const _deserialisedRSAKey = constants.deserialiseRSAKey(event.data[0])
const _rehydratedKey = Object.assign(Object.create(constants.prototypeRSAKey), _deserialisedRSAKey)
setKeypairRSA([_rehydratedKey, event.data[1]])
setMessage(['Encryption Keypair Generated', ''])
return
}
worker.onerror = (event) => {
if (event instanceof Event) {
console.error('❌ ERROR:', event)
setKeypairRSA(undefined)
setLoading(false)
setMessage(['Failed To Generate RSA Key', ''])
doCrash()
setColor('orangered')
setSigCount(0)
setProcessCount(0)
return
}
console.error('❌ UNKNOWN ERROR:', event)
setKeypairRSA(undefined)
setLoading(false)
setMessage(['Unknown Error While Generating RSA Key', ''])
doCrash()
setColor('orangered')
setSigCount(0)
setProcessCount(0)
return
}
worker.postMessage({
"_origin": origin,
"_caip10": caip10,
"_sigRSA": sigRSA,
"_salt": saltModalState.modalData
})
return () => {
worker.terminate()
}
keygen()
}
}
// eslint-disable-next-line react-hooks/exhaustive-deps
Expand Down Expand Up @@ -1196,6 +1231,7 @@ const Stealth: React.FC<ModalProps> = ({ show, onClose, _ENS_, chain, handlePare
}
resolve()
} catch (error) {
console.error('ERROR:', error)
setLoading(false)
setMessage(['Bad Invoice', ''])
doCrash()
Expand Down Expand Up @@ -1225,15 +1261,47 @@ const Stealth: React.FC<ModalProps> = ({ show, onClose, _ENS_, chain, handlePare
setGoodSalt(true)
}
} else if (sigRSA && !keypairRSA && isSigner) {
setLoading(true)
setMessage(['Generating Encryption Key', ''])
const keygen = async () => {
const _origin = hashType !== 'recordhash' ? `eth:${_Wallet_ || constants.zeroAddress}` : ENS
const __keypair = await RSAGEN(_origin, caip10, sigRSA, saltModalState.modalData)
setKeypairRSA(__keypair)
setMessage(['Generating Encryption Key', '+'])
const origin = hashType !== 'recordhash' ? `eth:${_Wallet_ || constants.zeroAddress}` : ENS
const worker = new Worker(new URL('../src/worker/worker', import.meta.url))
worker.onmessage = (event) => {
const _deserialisedRSAKey = constants.deserialiseRSAKey(event.data[0])
const _rehydratedKey = Object.assign(Object.create(constants.prototypeRSAKey), _deserialisedRSAKey)
setKeypairRSA([_rehydratedKey, event.data[1]])
setMessage(['Encryption Keypair Generated', ''])
return
}
worker.onerror = (event) => {
if (event instanceof Event) {
console.error('❌ ERROR:', event)
setKeypairRSA(undefined)
setLoading(false)
setMessage(['Failed To Generate RSA Key', ''])
doCrash()
setColor('orangered')
setSigCount(0)
setProcessCount(0)
return
}
console.error('❌ UNKNOWN ERROR:', event)
setKeypairRSA(undefined)
setLoading(false)
setMessage(['Unknown Error While Generating RSA Key', ''])
doCrash()
setColor('orangered')
setSigCount(0)
setProcessCount(0)
return
}
worker.postMessage({
"_origin": origin,
"_caip10": caip10,
"_sigRSA": sigRSA,
"_salt": saltModalState.modalData
})
return () => {
worker.terminate()
}
keygen()
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [keygen, keypairIPNS, goodSalt, write, sigIPNS, isSigner, sigRSA, keypairRSA, isPayment])
Expand Down Expand Up @@ -1398,11 +1466,7 @@ const Stealth: React.FC<ModalProps> = ({ show, onClose, _ENS_, chain, handlePare
setMessage(['Waiting For Signature', '2'])
_RSA = response
let _encryptionResult: any = {}
if (keypairRSA) {
_encryptionResult = cryptico.encrypt(`{"payer":"${_Payer}","payee":"${_Payee}","amount":"${_Amount}"}`, _RSA, keypairRSA[0])
} else {
_encryptionResult = cryptico.encrypt(`{"payer":"${_Payer}","payee":"${_Payee}","amount":"${_Amount}"}`, _RSA)
}
_encryptionResult = cryptico.encrypt(`{"payer":"${_Payer}","payee":"${_Payee}","amount":"${_Amount}"}`, _RSA)
const _THIS = newValues
_THIS['stealth'] = _encryptionResult.cipher
setNewValues(_THIS)
Expand Down Expand Up @@ -1908,7 +1972,7 @@ const Stealth: React.FC<ModalProps> = ({ show, onClose, _ENS_, chain, handlePare
{message[0]}
</span>
</div>
{message[1] && message[1] !== '-' && (
{message[1] && !['-', '+'].includes(message[1]) && (
<div
style={{
marginTop: '10px'
Expand All @@ -1930,7 +1994,7 @@ const Stealth: React.FC<ModalProps> = ({ show, onClose, _ENS_, chain, handlePare
</span>
</div>
)}
{message[1] && message[1] === '-' && (
{message[1] && ['-', '+'].includes(message[1]) && (
<div
style={{
marginTop: '10px'
Expand All @@ -1943,7 +2007,7 @@ const Stealth: React.FC<ModalProps> = ({ show, onClose, _ENS_, chain, handlePare
fontWeight: '700'
}}
>
<span>{message[0].includes('Refresh') ? 'Please Be Patient' : 'Please Be Patient'}</span>
<span>{message[1] === '-' ? 'Please Be Patient' : 'This Will Take Time. Hang on'}</span>
</span>
</div>
)}
Expand Down Expand Up @@ -2144,7 +2208,7 @@ const Stealth: React.FC<ModalProps> = ({ show, onClose, _ENS_, chain, handlePare
marginLeft: '-5px'
}}
>
{item.type === 'stealth' ? 'gpp_good': (RSA ? 'gpp_good' : 'gpp_bad')}
{item.type === 'stealth' ? 'gpp_good' : (RSA ? 'gpp_good' : 'gpp_bad')}
</div>
</button>
)}
Expand Down Expand Up @@ -2685,7 +2749,7 @@ const StyledModalHeader = styled.div`

const StyledModal = styled.div`
position: fixed;
top: 60px;
top: 60px;
width: auto;
min-width: 400px;
border-radius: 6px;
Expand All @@ -2698,7 +2762,7 @@ const StyledModal = styled.div`

const StyledModalOverlay = styled.div`
position: absolute;
top: -60px;
top: 0;
left: 0;
width: 100%;
height: 100%;
Expand Down
3 changes: 1 addition & 2 deletions components/Success.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,7 @@ const StyledModalHeader = styled.div`
`

const StyledModal = styled.div`
position: fixed;
top: 250px;
position: fixed;
background: rgba(66,46,40,1);
background-size: 400% 400%;
width: auto;
Expand Down
Empty file removed out/.nojekyll
Empty file.
Loading

0 comments on commit 281ba5e

Please sign in to comment.