-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #419 from permaweb/NickJ202/feat-relay-topup
chore: query relay operator for address
- Loading branch information
Showing
1 changed file
with
13 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -250,14 +250,23 @@ function fromDenominatedAmount(num) { | |
} | ||
|
||
export async function handleRelayTopup(jwk) { | ||
const RELAY = { | ||
url: `${process.env.RELAY_URL}/[email protected]/balance` | ||
}; | ||
|
||
const PAYMENT = { | ||
address: '0syT13r0s0tgPmIed95bJnuSqaD29HQNN8D3ElLSrsc', | ||
ticker: 'AO' | ||
}; | ||
const RELAY = { | ||
address: 'yTVz5K0XU52lD9O0iHh42wgBGSXgsPcu7wEY8GqWnFY', | ||
url: `${process.env.RELAY_URL}/[email protected]/balance` | ||
}; | ||
|
||
try { | ||
const relayAddressResponse = await fetch(`${process.env.RELAY_URL}/[email protected]/info/address`); | ||
RELAY.address = await relayAddressResponse.text(); | ||
} | ||
catch (e) { | ||
console.log(chalk.red('Error getting relay information')); | ||
process.exit(1); | ||
} | ||
|
||
const { dryrun, message, createDataItemSigner } = connect(); | ||
|
||
|