Merge pull request #3 from UlisesGascon/fix/remove-slash

fix: remove slash character at the end if exists
This commit is contained in:
Alicia Sykes 2023-07-17 22:46:12 +01:00 committed by GitHub
commit e25e4d643c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -55,7 +55,7 @@ const Home = (): JSX.Element => {
/* Check is valid address, either show err or redirect to results page */
const submit = () => {
let address = userInput;
let address = userInput.endsWith("/") ? userInput.slice(0, -1) : userInput;
const addressType = determineAddressType(address);
if (addressType === 'empt') {