After you beat Lakebed Temple, a goron in the Kakariko Vilage Malo Mart is collecting 1000 rupees to build the bridge to the east entrance of Castle Town and you can't buy anything there. When he's collecting a donation, it's actually possible to donate more than how much left he needs. After that, he's just outside that mart and you can do his test to get a heart piece from the goron on the bridge to the east entrance of Castle Town. Either you can donate another 2000 rupees to turn the Castle Town mart into a Malo Mart or you can give the goron in the field south of Castle Town hot spring water to unblock the way then you will only have to donate 200 rupees to turn that mart into a Malo Mart. Once the goron has already unblocked the way, if you haven't already donated 2000 rupees, you still have to donate another 200 rupees to turn the Castle Town mart into a Malo Mart even if you already donated some money towards it. You can't buy anything in the Kakariko Village Malo Mart again until you enter the Castle Town Malo Mart.