Commit 221b7a49 authored by henry's avatar henry
Browse files

fixup! Bug 40209: Implement Basic Crypto Safety

Bug 41539: Remove all whitespace from copied text before testing if it
looks like a crypto address.
parent 1340b399
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -74,7 +74,7 @@ class CryptoSafetyChild extends JSWindowActorChild {

      if (event.type == "copy" || event.type == "cut") {
        this.contentWindow.navigator.clipboard.readText().then(clipText => {
          const selection = clipText.trim();
          const selection = clipText.replace(/\s+/g, "");
          if (looksLikeCryptoAddress(selection)) {
            this.sendAsyncMessage("CryptoSafety:CopiedText", {
              selection,