Skip to content

Instantly share code, notes, and snippets.

### NOT integrated — no endpoint in the spec yet
| Page | What's missing | Notes |
|---|---|---|
| **Subscription Override** (`/ewi/loans/[id]/subscriptions/[subId]`) | Save override button — needs `PATCH /ewi/loans/:loanId/subscriptions/:subId` | The form renders and reads from the existing loan policy, but saving is a toast. The dry-run table is static dummy data (needs a dry-run eval endpoint) |
| **Alert Builder** (`/ewi/alerts/new` and `/ewi/alerts/[id]`) | Simulate, Save draft, Publish — needs `POST /ewi/alert-definitions` and `PATCH /ewi/alert-definitions/:id` | Fully designed UI, all buttons show a "coming soon" toast |
| **Alert Catalog — Deprecate** | Needs `PATCH /ewi/alert-definitions/:id` with `deprecated: true` | Deprecate button shows a toast |
---
@tofmat
tofmat / approval.tsx
Created February 6, 2025 11:35
Get approval!
if (Number(allowApproval) == 0) {
const deadline = Math.floor(Date.now() / 1000) + 3600;
const obj = {
owner: address as `0x${string}`,
spender:
selectedInvestmentType === "construction"
? (CONTRACT_CONFIG.CONSTRUCTION_POOL_ADDRESS as `0x${string}`)
: (CONTRACT_CONFIG.PERMANENT_POOL_ADDRESS as `0x${string}`),
value: BigInt(
"115792089237316195423570985008687907853269984665640564039457584007913129639935"
/*
0. I am doing really well today, weather is also quite chilled. Also going to see the new spiderman movie, So excited about that also.
*/
// 1
// New Dropdown Component.
import React, { useState } from 'react';
import { httpPatch } from 'lib/http';
@tofmat
tofmat / gpacalculator
Created September 8, 2019 20:50
GPA CALCULATOR
class Student:
def __init__(self, name, age):
fname = name.strip()+".txt"
student_file = open(fname, 'w')
student_file.write("Name: %s \n" % (name))
student_file.write("Age: %d \n" % (age))
student_file.close()
self.student_file = fname
self.name = name