From 79e24e10f281c8293d9d4e451eabf709d13f1ea4 Mon Sep 17 00:00:00 2001 From: Dylan Jones Date: Fri, 17 Apr 2026 02:26:46 +0100 Subject: [PATCH 1/2] Setup worldcup 2026 sweepstake --- app/controllers/monzo_transactions_controller.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/monzo_transactions_controller.rb b/app/controllers/monzo_transactions_controller.rb index 58f25d8..f0093b2 100644 --- a/app/controllers/monzo_transactions_controller.rb +++ b/app/controllers/monzo_transactions_controller.rb @@ -91,11 +91,11 @@ def webhook @webhook = params logger.info "Webhook recieved, data: #{@webhook}" - sweepstake = "eurovision-2025" - emojis = ["🎤", "eurovision"] + sweepstake = "world-cup-2026" + emojis = ["⚽️", "football"] begin - if @webhook["type"] == "transaction.created" and emojis.include? @webhook["data"]["notes"].strip.downcase and @webhook["data"]["amount"] == 100 + if @webhook["type"] == "transaction.created" and emojis.include? @webhook["data"]["notes"].strip.downcase and @webhook["data"]["amount"] == 200 logger.info "This is a #{sweepstake} payment" payee = @webhook["data"]["counterparty"]["name"] logger.info "from #{payee}" From 4cb9b65ac947889a6da53844a3055ce78eb8e859 Mon Sep 17 00:00:00 2001 From: Dylan Jones Date: Fri, 17 Apr 2026 02:30:16 +0100 Subject: [PATCH 2/2] Bump the pot by 2 --- app/controllers/monzo_transactions_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/monzo_transactions_controller.rb b/app/controllers/monzo_transactions_controller.rb index f0093b2..364f763 100644 --- a/app/controllers/monzo_transactions_controller.rb +++ b/app/controllers/monzo_transactions_controller.rb @@ -142,7 +142,7 @@ def webhook logger.info response.body data = { "fields": { - "pot": { "doubleValue": current_pot + 1 }, + "pot": { "doubleValue": current_pot + 2 }, } } response = RestClient.patch("#{base_url}/sweepstakes/#{sweepstake}?updateMask.fieldPaths=pot", data.to_json, content_type: :json)