Skip to content

Commit

Permalink
feature(setler-cli): remove escrow
Browse files Browse the repository at this point in the history
  • Loading branch information
mankins committed Aug 7, 2023
1 parent 2684bc5 commit 8ccbb96
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 14 deletions.
3 changes: 1 addition & 2 deletions identity-wallet/setler-cli/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,14 @@ Subsections: (Added, Changed, Deprecated, Removed, Fixed, Security)
- Allow flag to create Kudos with Escrow
- Extra debugging to ident
- `whoami` action to show current address, public key
- `message` action to debug encrypted messages
- `message` action to debug encrypted messages including chat mode
- New functions encryprt/decrypt to coins lib
- Wallet now has `send` option to send funds to another address

### Changed

- `setler kudos send` now uses `thanks` method to publish encrypted identity to the blockchain instead of `escrow` option


## [0.0.15] - 2023-07-03

### Fixed
Expand Down
6 changes: 5 additions & 1 deletion identity-wallet/setler-cli/src/actions/ident.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ const exec = async (context) => {
did,
identResolver,
network,
debug: context.debug,
});

const response = await waitFor(expandPromise, {
Expand All @@ -270,7 +271,10 @@ const exec = async (context) => {
// escrowMethod = e.extra.escrowMethod;

if (e.extra.escrowMethod) {
log(`${did} = ` + chalk.yellow(`${e.extra.escrowMethod}`));
log(
`${did} = ` +
chalk.yellow(`${JSON.stringify(e.extra.escrowMethod)}`)
);
}
if (e.extra.kudosLogConfig) {
log(
Expand Down
8 changes: 6 additions & 2 deletions identity-wallet/setler-cli/src/actions/kudos.js
Original file line number Diff line number Diff line change
Expand Up @@ -1259,6 +1259,10 @@ const exec = async (context) => {
const kudosMemo = {
// identity: the identity that got sent the kudos
// TODO: get the poolId ... but we also want the package that the kudos came from, so may need to refactor
description: identity.description,
name: identity.name,
package: identity.package,
type: identity.type,
};
kudosMemos.push(kudosMemo);
addresses.push(address);
Expand Down Expand Up @@ -2182,14 +2186,14 @@ const exec = async (context) => {
if (currentAddress.shouldThank) {
console.log("sending thank you to", JSON.stringify(currentAddress));

const IDENT_NOTIFY_ADDRESS = "rhDEt27CCSbdA8hcnvyuVniSuQxww3NAs3"; // TODO: lookup dynamically
const IDENT_NOTIFY_ADDRESS = "rhDEt27CCSbdA8hcnvyuVniSuQxww3NAs3"; // TODO: lookup dynamically, compare with hard coded and warn if different
const IDENT_PUBLIC_KEY =
"02FF4B735099A5CDAB387201E7B67092132D38B07E1F3C04A8FE1FA1C223ECD913";

const thanksMessage = {
...currentAddress.kudosMemo,
id: currentAddress.address,
score: currentAddress.originalWeight,
score: `${currentAddress.originalWeight}`,
};

// create an encrypted memo
Expand Down
18 changes: 9 additions & 9 deletions identity-wallet/setler-cli/src/lib/did.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,15 @@ export const expandDid = async ({ did, identResolver, network, debug }) => {
identResolver = identResolver.slice(0, -1);
}

// escrowMethods {
// type
// address
// time
// fee
// terms
// onExpiration
// }

const gqlQuery = {
query: `query SocialPay($identifier: String!) {
socialPay(identifier: $identifier) {
Expand All @@ -21,15 +30,6 @@ export const expandDid = async ({ did, identResolver, network, debug }) => {
value
}
escrowMethods {
type
address
time
fee
terms
onExpiration
}
status {
message
code
Expand Down

0 comments on commit 8ccbb96

Please sign in to comment.