cask "bluewallet" do version "8.0.2" sha256 "48a00b77db731de45d2de8262a9047c06c43547f359730f966400eaf88fbf019" url "https://github.com/BlueWallet/BlueWallet/releases/download/v#{version}/BlueWallet.#{version}.dmg" name "BlueWallet" desc "Bitcoin wallet and Lightning wallet" homepage "https://bluewallet.io/" # Not every GitHub release provides a file for macOS, so we check multiple # recent releases instead of only the "latest" release. livecheck do url :url regex(/^BlueWallet[._-]v?(\d+(?:\.\d+)+)\.dmg$/i) strategy :github_releases do |json, regex| json.map do |release| next if release["draft"] || release["prerelease"] release["assets"]&.map do |asset| match = asset["name"]&.match(regex) next if match.blank? match[1] end end.flatten end end depends_on macos: :sonoma app "BlueWallet.app" zap trash: [ "~/Library/Application Scripts/io.bluewallet.bluewallet", "~/Library/Containers/io.bluewallet.bluewallet", "~/Library/Group Containers/group.io.bluewallet.bluewallet", ] end